From 09f2bf17edd3bca746f8af9e53d6c442d8e8d2a5 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Mon, 24 Jul 2023 19:37:23 +0200 Subject: [PATCH] firstChild could be null --- haxe/ui/parsers/ui/XMLParser.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haxe/ui/parsers/ui/XMLParser.hx b/haxe/ui/parsers/ui/XMLParser.hx index efe317e4e..f45f1ae50 100644 --- a/haxe/ui/parsers/ui/XMLParser.hx +++ b/haxe/ui/parsers/ui/XMLParser.hx @@ -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") {