From d6575455eedf8fc4dbe4bd1b8101361f4257d0c4 Mon Sep 17 00:00:00 2001
From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com>
Date: Thu, 17 Oct 2024 22:24:01 +0200
Subject: [PATCH] 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
---
 src/config/LaunchSettings.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/config/LaunchSettings.cpp b/src/config/LaunchSettings.cpp
index bf38b9cf2..32a069c67 100644
--- a/src/config/LaunchSettings.cpp
+++ b/src/config/LaunchSettings.cpp
@@ -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;
 	}