More debug prints and avoid null pointer.

This commit is contained in:
BenDol
2014-07-14 01:56:17 +12:00
parent 74979ca16a
commit 9e0ddb08e3
2 changed files with 2 additions and 3 deletions

View File

@@ -447,9 +447,9 @@ UIWidgetPtr UIManager::createWidgetFromOTML(const OTMLNodePtr& widgetNode, const
if(parent)
parent->addChild(widget);
widget->callLuaField("onCreate");
if(widget) {
widget->callLuaField("onCreate");
widget->setStyleFromNode(styleNode);
for(const OTMLNodePtr& childNode : styleNode->children()) {