#7778 Check for valid pointer to main window before use

This commit is contained in:
Magne Sjaastad
2022-05-21 16:11:55 +02:00
parent 886f5e3295
commit ccfc0e25bc
4 changed files with 29 additions and 28 deletions

View File

@@ -61,7 +61,10 @@ void RicExitApplicationFeature::onActionTriggered( bool isChecked )
topLevelWidget->hide();
}
// Close just the main window, it'll take care of closing the plot window
app->mainWindow()->close();
if ( app->mainWindow() )
{
app->mainWindow()->close();
}
}
//--------------------------------------------------------------------------------------------------