mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
View Linker: Remove child array entry after deletion to have a valid datastructure through destruction.
This commit is contained in:
@@ -72,10 +72,10 @@ void RicDeleteItemExec::redo()
|
||||
m_commandData->m_deletedObjectAsXml = xmlObj(obj)->writeObjectToXmlString();
|
||||
}
|
||||
|
||||
listField->erase(m_commandData->m_indexToObject);
|
||||
|
||||
delete obj;
|
||||
|
||||
listField->erase(m_commandData->m_indexToObject);
|
||||
|
||||
caf::PdmObjectHandle* parentObj = listField->ownerObject();
|
||||
parentObj->uiCapability()->updateConnectedEditors();
|
||||
|
||||
|
||||
@@ -285,8 +285,8 @@ void RimViewLinker::setMasterView(RimView* view)
|
||||
// Remove the view as dependent view
|
||||
if (previousViewController)
|
||||
{
|
||||
this->viewLinks.removeChildObject(previousViewController);
|
||||
delete previousViewController;
|
||||
this->viewLinks.removeChildObject(NULL);
|
||||
}
|
||||
|
||||
this->removeOverrides();
|
||||
|
||||
Reference in New Issue
Block a user