forked from Mirrors/openclonk
win32: Do not throw exceptions from WinMain
parent
672cc97d2b
commit
e049254e95
|
@ -88,7 +88,12 @@ int WINAPI WinMain (HINSTANCE hInst,
|
|||
int argc = 0;
|
||||
LPWSTR *wargv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
if (!wargv)
|
||||
throw std::runtime_error("Unable to split command line");
|
||||
{
|
||||
const char *error = "Internal error: Unable to split command line! Exiting.";
|
||||
Log(error);
|
||||
Application.MessageDialog(error);
|
||||
return C4XRV_Failure;
|
||||
}
|
||||
argv.reserve(argc);
|
||||
|
||||
// Convert args to UTF-8
|
||||
|
|
Loading…
Reference in New Issue