Fix NULL _Parent and uninitialized parentId

feature/pre-code-move
kaetemi 5 years ago committed by Jan Boon
parent 9d5af13c5e
commit 71e3ed5868

@ -622,12 +622,29 @@ namespace NLGUI
{ {
std::string parentId; std::string parentId;
if( value != "parent" ){ if (value != "parent")
{
if (_Parent != NULL) if (_Parent != NULL)
{
parentId = _Parent->getId() + ":" + value; parentId = _Parent->getId() + ":" + value;
}
else
{
parentId = "ui:" + value;
}
}
else else
{
if (_Parent)
{
parentId = _Parent->getId(); parentId = _Parent->getId();
} }
else
{
parentId = value;
}
}
CWidgetManager::getInstance()->getParser()->addParentSizeMaxAssociation(this, parentId); CWidgetManager::getInstance()->getParser()->addParentSizeMaxAssociation(this, parentId);
return; return;
} }

Loading…
Cancel
Save