This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7b72c01  LayoutChangeNotifier: fix NPE
7b72c01 is described below

commit 7b72c0182e4fcf712130dac86c36e2c61fba4786
Author: Carlos Rovira <[email protected]>
AuthorDate: Sat Jun 6 19:46:12 2020 +0200

    LayoutChangeNotifier: fix NPE
---
 .../royale/html/beads/layouts/LayoutChangeNotifier.as      | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/LayoutChangeNotifier.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/LayoutChangeNotifier.as
index 540e275..f62e5d5 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/LayoutChangeNotifier.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/LayoutChangeNotifier.as
@@ -18,12 +18,9 @@
 
////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.html.beads.layouts
 {      
-       import org.apache.royale.core.IBead;
-    import org.apache.royale.core.IBeadView;
-       import org.apache.royale.core.IStrand;
-       import org.apache.royale.events.Event;
-       import org.apache.royale.events.IEventDispatcher;
        import org.apache.royale.core.Bead;
+       import org.apache.royale.core.IBeadView;
+       import org.apache.royale.events.Event;
        import org.apache.royale.utils.sendStrandEvent;
        
        /**
@@ -75,7 +72,6 @@ package org.apache.royale.html.beads.layouts
                 *  @playerversion AIR 2.6
                 *  @productversion Royale 0.9
                 *  @royaleignorecoercion org.apache.royale.core.IBeadView
-                *  @royaleignorecoercion 
org.apache.royale.events.IEventDispatcher
                 */
                public function set watchedProperty(value:Object):void
                {
@@ -84,8 +80,10 @@ package org.apache.royale.html.beads.layouts
                 _value = value;
                 if (_strand is IBeadView)
                     IBeadView(_strand).host.dispatchEvent(new 
Event("layoutNeeded"));
-                else
-                    sendStrandEvent(_strand,"layoutNeeded");
+                else {
+                                       if (_strand)
+                       sendStrandEvent(_strand, "layoutNeeded");
+                               }
             }
                }
                

Reply via email to