Fix crash seen when deleting a 3D view part of a linked view collection

This commit is contained in:
Magne Sjaastad
2023-01-10 15:46:19 +01:00
parent 5a56a285a0
commit b108cdb72d
2 changed files with 13 additions and 2 deletions

View File

@@ -65,6 +65,9 @@ void RicDeleteItemExec::redo()
m_commandData.m_deletedObjectAsXml = xmlObj( obj )->writeObjectToXmlString();
}
// Make sure the object is disconnected from other objects before delete
obj->prepareForDelete();
delete obj;
listField->erase( m_commandData.m_indexToObject );