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:
parent
6486f342b5
commit
0ae254f6a8
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user