Fixed crash on project close introduced by update of MDI window title with Primary/Controlled

This commit is contained in:
Jacob Støren
2019-10-28 13:53:32 +01:00
parent ff7c586021
commit b2f8c56a0d
2 changed files with 5 additions and 1 deletions

View File

@@ -86,6 +86,9 @@ RimGridView::~RimGridView( void )
if ( proj && this->isMasterView() )
{
RimViewLinker* viewLinker = this->assosiatedViewLinker();
viewLinker->setMasterView(nullptr);
delete proj->viewLinkerCollection->viewLinker();
proj->viewLinkerCollection->viewLinker = nullptr;

View File

@@ -305,7 +305,8 @@ QString RimViewLinker::displayNameForView( RimGridView* view )
//--------------------------------------------------------------------------------------------------
void RimViewLinker::setMasterView( RimGridView* view )
{
RimViewController* previousViewController = view->viewController();
RimViewController* previousViewController = nullptr;
if (view) previousViewController = view->viewController();
// Remove the view as dependent view
if ( previousViewController )