1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

Fixed segfault opening tables

This commit is contained in:
graffy76 2013-07-18 06:31:47 -05:00
parent 6486f342b5
commit 0ae254f6a8

View File

@ -217,9 +217,12 @@ void CSVWorld::Table::updateEditorSetting (const QString &settingName, const QSt
if (settingName == "Referenceable ID Type Display")
{
RefIdTypeDelegate &refidDelegate = dynamic_cast <CSVWorld::RefIdTypeDelegate &> (*itemDelegateForColumn(2));
RefIdTypeDelegate *refidDelegate = dynamic_cast <CSVWorld::RefIdTypeDelegate *> (itemDelegateForColumn(2));
refidDelegate.updateEditorSetting (settingName, settingValue);
emit dataChanged(mModel->index(0,1), mModel->index(mModel->rowCount()-1, 1));
if (refidDelegate)
{
refidDelegate->updateEditorSetting (settingName, settingValue);
emit dataChanged(mModel->index(0,1), mModel->index(mModel->rowCount()-1, 1));
}
}
}