From a2eea07a567b591e55e11688547f60d93e2d26ad Mon Sep 17 00:00:00 2001 From: Julien Pireaud Date: Mon, 27 Apr 2020 12:40:04 -0700 Subject: [PATCH] Fixed command line crash when no weather file is present in the VRP file --- VarroaPopDoc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VarroaPopDoc.cpp b/VarroaPopDoc.cpp index df6e155..23668ed 100644 --- a/VarroaPopDoc.cpp +++ b/VarroaPopDoc.cpp @@ -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)