do not let users register on an event that has not been specifically enabled at initialize. add test.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@872 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-04 13:18:16 +00:00
parent 585ec9e192
commit 83eb0e1b34
2 changed files with 7 additions and 2 deletions

View File

@@ -105,7 +105,9 @@ OpenLayers.Events.prototype = {
obj = this.object;
}
var listeners = this.listeners[type];
listeners.push( {obj: obj, func: func} );
if (listeners != null) {
listeners.push( {obj: obj, func: func} );
}
}
},