You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/03/11 21:02:39 UTC

[royale-asjs] branch develop updated: add check that Flex had for already removed popups

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

aharui 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 8a9a07d  add check that Flex had for already removed popups
8a9a07d is described below

commit 8a9a07d222e39c2d25b814786ed2a1f803c98994
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 11 14:02:18 2020 -0700

    add check that Flex had for already removed popups
---
 .../src/main/royale/mx/managers/PopUpManager.as         | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
index d548bde..4c41ff2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
@@ -254,13 +254,16 @@ public class PopUpManager
      */
     public static function removePopUp(popUp:IFlexDisplayObject):void
     {
-        var popUpHost:IUIBase = (popUp.parent as IPopUpHostParent).popUpHost as IUIBase;
-		UIUtils.removePopUp(popUp as IChild);
-        if (modalWindows.length > 0 && modalWindows[modalWindows.length - 1] == popUp)
-        {
-            PopUpManagerModal.remove(popUpHost);
-            modalWindows.pop();
-        }
+		if (popUp && popUp.parent)
+		{
+	        var popUpHost:IUIBase = (popUp.parent as IPopUpHostParent).popUpHost as IUIBase;
+			UIUtils.removePopUp(popUp as IChild);
+	        if (modalWindows.length > 0 && modalWindows[modalWindows.length - 1] == popUp)
+	        {
+	            PopUpManagerModal.remove(popUpHost);
+	            modalWindows.pop();
+	        }
+		}
     }
 } // class
 } // package