Fixed crashing bug that occurred if a WAnimParamsEditor is created for an MP1/2 property that has no valid animset

This commit is contained in:
parax0 2015-09-26 16:56:51 -06:00
parent 07d7f14dc7
commit fa86d07b2d
1 changed files with 3 additions and 2 deletions

View File

@ -137,6 +137,7 @@ void WAnimParamsEditor::SetupUI()
mpCharComboBox = new QComboBox(this); mpCharComboBox = new QComboBox(this);
CAnimSet *pSet = static_cast<CAnimSet*>(mParams.Resource()); CAnimSet *pSet = static_cast<CAnimSet*>(mParams.Resource());
if (pSet)
for (u32 iChar = 0; iChar < pSet->getNodeCount(); iChar++) for (u32 iChar = 0; iChar < pSet->getNodeCount(); iChar++)
mpCharComboBox->addItem(QString::fromStdString(pSet->getNodeName(iChar))); mpCharComboBox->addItem(QString::fromStdString(pSet->getNodeName(iChar)));