 		
 		public function hasEventListener(type:String):Boolean
 		{
+			if (listeners==null){
+				return false;
+			}
 			return listeners[type] != null;
 		}
 		

	[Event(name = "activate", type = "flash.events.Event")]
	public class EventDispatcher extends Object implements IEventDispatcher
	{
		private var listeners:Object = {};
		
		public function EventDispatcher(target:IEventDispatcher = null)
		{

		
		public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
		{
			if (listeners==null){
				return ;
			}
			var funcs:Array = listeners[type];
			if (funcs)
			{
