A fix for #440. Prevent people who somehow get a null element in the event
cache from shooting themselves in the foot: This doesn't seem to happen often, but it has happened in internal code. I'm going to add more debugging info to #440 as we get it, but want to get this in to prevent people from shooting themselves in the foot in IE accidentally. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2024 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -96,9 +96,9 @@ OpenLayers.Event = {
|
||||
|| element.detachEvent))
|
||||
name = 'keydown';
|
||||
|
||||
if (element.removeEventListener) {
|
||||
if (element && element.removeEventListener) {
|
||||
element.removeEventListener(name, observer, useCapture);
|
||||
} else if (element.detachEvent) {
|
||||
} else if (element && element.detachEvent) {
|
||||
element.detachEvent('on' + name, observer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user