Linux: Fix crash on invalid command-line arguments

use std::cout instead of wxMessageBox which does not work when wxWidgets has not been initialised yet
This commit is contained in:
goeiecool9999 2024-10-17 22:24:01 +02:00
parent 3acd0c4f2c
commit d6575455ee

View File

@ -199,7 +199,11 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
std::string errorMsg; std::string errorMsg;
errorMsg.append("Error while trying to parse command line parameter:\n"); errorMsg.append("Error while trying to parse command line parameter:\n");
errorMsg.append(ex.what()); errorMsg.append(ex.what());
#if BOOST_OS_WINDOWS
wxMessageBox(errorMsg, "Parameter error", wxICON_ERROR); wxMessageBox(errorMsg, "Parameter error", wxICON_ERROR);
#else
std::cout << errorMsg << std::endl;
#endif
return false; return false;
} }