#8290 commandFile: Crash for scaleFractureTemplate

Make sure closeProject() is called before application exit. If not, some field editors will remain open an cause assert and crash on shutdown.
This commit is contained in:
Magne Sjaastad 2021-11-25 09:00:59 +01:00
parent ed914a03a4
commit 5f2ae7a9ba
2 changed files with 6 additions and 2 deletions

View File

@ -109,10 +109,16 @@ int main( int argc, char* argv[] )
if ( status == RiaApplication::ApplicationStatus::EXIT_COMPLETED )
{
// Make sure project is closed to avoid assert and crash in destruction of widgets
app->closeProject();
return 0;
}
else if ( status == RiaApplication::ApplicationStatus::EXIT_WITH_ERROR )
{
// Make sure project is closed to avoid assert and crash in destruction of widgets
app->closeProject();
return 2;
}
else if ( status == RiaApplication::ApplicationStatus::KEEP_GOING )

View File

@ -776,8 +776,6 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
RiuMainWindow::instance()->loadWinGeoAndDockToolBarLayout();
closeProject();
return ApplicationStatus::EXIT_COMPLETED;
}