Skip to content

Commit

Permalink
firstChild could be null
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Jul 24, 2023
1 parent 16e3865 commit 09f2bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haxe/ui/parsers/ui/XMLParser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class XMLParser extends ComponentParser {
} else if (nodeName == "data") {
if (xml.firstElement() != null) {
component.parent.data = StringTools.trim(xml.toString());
} else if (StringTools.startsWith(StringTools.trim(xml.firstChild().nodeValue), "[")) {
} else if (xml.firstChild() != null && StringTools.startsWith(StringTools.trim(xml.firstChild().nodeValue), "[")) {
component.parent.data = StringTools.trim(xml.firstChild().nodeValue);
}
} else if (nodeName == "validator") {
Expand Down

0 comments on commit 09f2bf1

Please sign in to comment.