Permalink
Browse files

fixed null reference exception

  • Loading branch information...
1 parent 5024d1b commit 5ea1fcf2652029287d325fedde853a46ec04a0c4 @PrimaryFeather PrimaryFeather committed Dec 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 starling/src/starling/events/EventDispatcher.as
@@ -92,9 +92,9 @@ package starling.events
if (previousTarget == null || event.currentTarget != null) event.setTarget(this);
var stopImmediatePropagation:Boolean = false;
- var numListeners:int = listeners.length;
+ var numListeners:int = listeners == null ? 0 : listeners.length;
- if (listeners != null && numListeners != 0)
+ if (numListeners != 0)
{
event.setCurrentTarget(this);

0 comments on commit 5ea1fcf

Please sign in to comment.