mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Fix crash on save project in console mode
This commit is contained in:
1 parent
6b13a31349
commit
b760404876
1 file changed
+8
-5
@@ -358,12 +358,15 @@ void RimProject::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::setupBeforeSave()
|
||||
{
|
||||
RiaGuiApplication* guiApp = RiaGuiApplication::instance();
|
||||
|
||||
if ( guiApp )
|
||||
if ( RiaGuiApplication::isRunning() )
|
||||
{
|
||||
m_show3DWindow = guiApp->mainWindow()->isVisible();
|
||||
m_showPlotWindow = guiApp->mainPlotWindow() && guiApp->mainPlotWindow()->isVisible();
|
||||
RiaGuiApplication* guiApp = RiaGuiApplication::instance();
|
||||
|
||||
if ( guiApp )
|
||||
{
|
||||
m_show3DWindow = guiApp->mainWindow()->isVisible();
|
||||
m_showPlotWindow = guiApp->mainPlotWindow() && guiApp->mainPlotWindow()->isVisible();
|
||||
}
|
||||
}
|
||||
|
||||
m_projectFileVersionString = STRPRODUCTVER;
|
||||
|
||||
Reference in new issue
Block a user