diff --git a/src/winmain.cpp b/src/winmain.cpp index c1cb0ec6..cedaa635 100644 --- a/src/winmain.cpp +++ b/src/winmain.cpp @@ -606,21 +606,21 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int) customParam = getParamVal('p', lpszCmdLine); } - // Object (gupParams) is moved here because we need app icon form configuration file - GupParameters gupParams("gup.xml"); - appIconFile = gupParams.getSoftwareIcon(); + try { + // Object (gupParams) is moved here because we need app icon form configuration file + GupParameters gupParams("gup.xml"); + appIconFile = gupParams.getSoftwareIcon(); - if (isHelp) - { - ::MessageBoxA(NULL, MSGID_HELP, "GUP Command Argument Help", MB_OK); - return 0; - } + if (isHelp) + { + ::MessageBoxA(NULL, MSGID_HELP, "GUP Command Argument Help", MB_OK); + return 0; + } - GupExtraOptions extraOptions("gupOptions.xml"); - GupNativeLang nativeLang("nativeLang.xml"); + GupExtraOptions extraOptions("gupOptions.xml"); + GupNativeLang nativeLang("nativeLang.xml"); - hInst = hInstance; - try { + hInst = hInstance; if (launchSettingsDlg) { if (extraOptions.hasProxySettings())