flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/16] git commit: [flex-asjs] [refs/heads/develop] - try to remove listeners when done and protect if not removed in time
Date Mon, 05 Jan 2015 23:21:24 GMT
try to remove listeners when done and protect if not removed in time


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/22666dfb
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/22666dfb
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/22666dfb

Branch: refs/heads/develop
Commit: 22666dfb4d69bc7dc70d56103c53b3e96b5f18e5
Parents: 4b9f33c
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jan 5 10:09:22 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jan 5 15:21:00 2015 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/StatesWithTransitionsImpl.as       | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/22666dfb/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
index c8aeb6f..75b6815 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
@@ -167,9 +167,14 @@ package org.apache.flex.core
          */
         private function effectEndHandler(event:Event):void
         {
+            // in case of extraneous calls to effectEndHandler
+            if (transitionEffects == null)
+                return;
+            
             var n:int = transitionEffects.length;
             for (var i:int = 0; i < n; i++)   
             {
+                event.target.removeEventListener(Effect.EFFECT_END, effectEndHandler);
                 if (transitionEffects[i] == event.target)
                     transitionEffects.splice(i, 1);
             }


Mime
View raw message