diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index 59306c943e..db979b4874 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -1,7 +1,7 @@ /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full * text of the license. */ - + /** * @class */ @@ -159,7 +159,7 @@ OpenLayers.Events.prototype = { // execute all callbacks registered for specified type var listeners = this.listeners[type]; - if (listeners != null) { + if ((listeners != null) && (listeners.length > 0)) { for (var i = 0; i < listeners.length; i++) { var callback = listeners[i]; var continueChain;