Skip to content

Commit

Permalink
Engine: safety fix in break_into_debugger()
Browse files Browse the repository at this point in the history
This fixes engine getting stuck forever if sending "BREAK" to debugger failed for any reason.
  • Loading branch information
ivan-mogilko committed Jan 6, 2025
1 parent 56d450a commit 889782a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Engine/debug/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,12 @@ void break_into_debugger()
{
#if AGS_PLATFORM_OS_WINDOWS

if (!send_state_to_debugger("BREAK"))
return;

if (editor_window_handle != NULL)
SetForegroundWindow(editor_window_handle);

send_state_to_debugger("BREAK");
game_paused_in_debugger = 1;

while (game_paused_in_debugger)
Expand Down

0 comments on commit 889782a

Please sign in to comment.