Fixed crashing on empty string for UIRichTextLabel
This commit is contained in:
		@@ -30,6 +30,7 @@ void UIRichTextLabel::onStart() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    std::function<void(Xml*)> parseChildren = [&](Xml *node) {
 | 
					    std::function<void(Xml*)> parseChildren = [&](Xml *node) {
 | 
				
			||||||
      if(node->children.empty()) {
 | 
					      if(node->children.empty()) {
 | 
				
			||||||
 | 
					        if(node->node == "root") return;
 | 
				
			||||||
        struct UILabelText text;
 | 
					        struct UILabelText text;
 | 
				
			||||||
        text.style = current;
 | 
					        text.style = current;
 | 
				
			||||||
        text.text = node->value;
 | 
					        text.text = node->value;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,6 @@
 | 
				
			|||||||
using namespace Dawn;
 | 
					using namespace Dawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
 | 
					Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
 | 
				
			||||||
  return new HelloWorldScene(game);
 | 
					  // return new HelloWorldScene(game);
 | 
				
			||||||
  // return new Scene1Prologue(game);
 | 
					  return new Scene1Prologue(game);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user