Skip to content

Commit

Permalink
Fix shutdown when called from tray callback (LizardByte#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheElixZammuto authored and KuleRucket committed Jun 6, 2024
1 parent eedad3b commit 0f734c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/system_tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ namespace system_tray {
// If we're running in a service, return a special status to
// tell it to terminate too, otherwise it will just respawn us.
if (GetConsoleWindow() == NULL) {
lifetime::exit_sunshine(ERROR_SHUTDOWN_IN_PROGRESS, false);
lifetime::exit_sunshine(ERROR_SHUTDOWN_IN_PROGRESS, true);
return;
}
#endif

lifetime::exit_sunshine(0, false);
lifetime::exit_sunshine(0, true);
}

// Tray menu
Expand Down

0 comments on commit 0f734c3

Please sign in to comment.