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,8 +137,9 @@ 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());
for (u32 iChar = 0; iChar < pSet->getNodeCount(); iChar++) if (pSet)
mpCharComboBox->addItem(QString::fromStdString(pSet->getNodeName(iChar))); for (u32 iChar = 0; iChar < pSet->getNodeCount(); iChar++)
mpCharComboBox->addItem(QString::fromStdString(pSet->getNodeName(iChar)));
mpCharComboBox->setCurrentIndex(mParams.CharacterIndex()); mpCharComboBox->setCurrentIndex(mParams.CharacterIndex());
mpLabels[1] = new QLabel("Character", this); mpLabels[1] = new QLabel("Character", this);