You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2021/12/23 16:54:03 UTC

[royale-asjs] 01/02: Make sure labelObj exists when measuring

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

commit abfa2c3a4fe1bf49f0b5534f74e3cb7b1194a72f
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Thu Dec 23 18:46:09 2021 +0200

    Make sure labelObj exists when measuring
---
 .../projects/MXRoyale/src/main/royale/mx/containers/FormItem.as       | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
index 8dcdb51..ca145be 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
@@ -1383,6 +1383,10 @@ public class FormItem extends Container
      */
     internal function getPreferredLabelWidth():Number
     {
+        if (!labelObj)
+        {
+            return 0;
+        }
         if (!label || label == "")
             return 0;