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

yishayw 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 7508969  Allow for setting module url to null
     new bb0e5ed  Merge branch 'develop' of 
https://gitbox.apache.org/repos/asf/royale-asjs into develop
7508969 is described below

commit 7508969ba2ab1ac246a454353ee1dd0c8dd210d0
Author: DESKTOP-RH4S838\Yishay <[email protected]>
AuthorDate: Wed Apr 8 12:20:16 2020 +0300

    Allow for setting module url to null
---
 .../projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
index e4e7d17..fb413b3 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
@@ -346,11 +346,11 @@ public class ModuleLoader extends VBox
             }
         }
           */
-        var c:int = value.lastIndexOf("/");
+        var c:int = value ? value.lastIndexOf("/") : -1;
         if (c == -1)
         {
             utils.modulePath = "";
-            utils.moduleName = value.replace(".swf", "");
+            utils.moduleName = value ? value.replace(".swf", "") : "";
         }
         else
         {
@@ -360,7 +360,9 @@ public class ModuleLoader extends VBox
 
         dispatchEvent(new FlexEvent(FlexEvent.URL_CHANGED));
 
-        utils.loadModule(this);
+        
+        if (url != null && url != "" && loadRequested)
+            utils.loadModule(this);
     }
  
 }

Reply via email to