Skip to content

Commit

Permalink
Linux: Fix crash on invalid command-line arguments
Browse files Browse the repository at this point in the history
use std::cout instead of wxMessageBox which does not work when wxWidgets has not been initialised yet
  • Loading branch information
goeiecool9999 committed Oct 17, 2024
1 parent 3acd0c4 commit d657545
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config/LaunchSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
std::string errorMsg;
errorMsg.append("Error while trying to parse command line parameter:\n");
errorMsg.append(ex.what());
#if BOOST_OS_WINDOWS
wxMessageBox(errorMsg, "Parameter error", wxICON_ERROR);
#else
std::cout << errorMsg << std::endl;
#endif
return false;
}

Expand Down

0 comments on commit d657545

Please sign in to comment.