You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2024/12/09 22:07:29 UTC

(royale-compiler) 08/22: EmbedNode: if containing file path is null, skip file name normalization to fix null exception

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

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

commit fee4cb1ac91944249569563cb6397d6ee3ecb7a3
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Thu Oct 17 13:55:26 2024 -0700

    EmbedNode: if containing file path is null, skip file name normalization to fix null exception
---
 .../org/apache/royale/compiler/internal/tree/as/EmbedNode.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/EmbedNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/EmbedNode.java
index 5f834a8c2..76ad10314 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/EmbedNode.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/EmbedNode.java
@@ -57,7 +57,14 @@ public class EmbedNode extends ExpressionNodeBase implements IEmbedNode, IEmbedR
      */
     public EmbedNode(String containingFilePath, IMetaTagNode metaData, IFileNodeAccumulator fileNodeAccumulator)
     {
-        this.containingSourceFilename = FilenameNormalization.normalize(containingFilePath);
+        if (containingFilePath != null)
+        {
+            this.containingSourceFilename = FilenameNormalization.normalize(containingFilePath);
+        }
+        else
+        {
+            this.containingSourceFilename = null;
+        }
         this.metaData = metaData;
         assert metaData != null && metaData.getAllAttributes() != null; //can be empty array