Skip to content

Commit

Permalink
Fixed command line crash when no weather file is present in the VRP file
Browse files Browse the repository at this point in the history
  • Loading branch information
jpireaud committed Apr 27, 2020
1 parent 08c7330 commit a2eea07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VarroaPopDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ void CVarroaPopDoc::WeatherFileMissing()
CString msg = " This Session has no associated Weather File\n";
msg += "You will have to specify one before you run a simulation";
MyMessageBox(msg);
((CMainFrame*)(AfxGetApp()->m_pMainWnd))->m_WeatherFileName = "";
if (gl_RunGUI)
((CMainFrame*)(AfxGetApp()->m_pMainWnd))->m_WeatherFileName = "";
}

void CVarroaPopDoc::WeatherFileLoaded(bool loaded, const CString& filename)
Expand Down

0 comments on commit a2eea07

Please sign in to comment.