From 3c066de15844f8a46b01f021acc626451c43f2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 10 May 2018 00:59:21 +0200 Subject: [PATCH] Win32: Not really appropriate to call exit() on a bad filename. Fixes #11030 --- UI/NativeApp.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 2dd663f5f0..24277f9759 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -500,12 +500,22 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch std::unique_ptr fileLoader(ConstructFileLoader(boot_filename)); if (!fileLoader->Exists()) { fprintf(stderr, "File not found: %s\n", boot_filename.c_str()); +#ifdef _WIN32 + // Ignore and proceed. +#else + // Bail. exit(1); +#endif } } } else { fprintf(stderr, "Can only boot one file"); +#ifdef _WIN32 + // Ignore and proceed. +#else + // Bail. exit(1); +#endif } } }