[host] dont overwrite the exit code on shutdown

This commit is contained in:
Geoffrey McRae
2021-01-21 15:14:50 +11:00
parent ad9e84eaaa
commit e926bad759
3 changed files with 9 additions and 3 deletions

View File

@@ -304,11 +304,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
shutdown:
DestroyMenu(app.trayMenu);
app_quit();
app_shutdown();
if (!lgJoinThread(thread, &result))
{
DEBUG_ERROR("Failed to join the main application thread");
result = -1;
result = LG_HOST_EXIT_FAILED;
}
finish: