From da0911d69bc29f72e02ba7e4e7d3d2ba0e37fd58 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 18 Jul 2016 14:30:21 +0300 Subject: [PATCH] Fixed SDL crash --- Core/debugger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/debugger.c b/Core/debugger.c index 4d278a4..b384626 100644 --- a/Core/debugger.c +++ b/Core/debugger.c @@ -1411,10 +1411,9 @@ next_command: void GB_debugger_handle_async_commands(GB_gameboy_t *gb) { - if (!gb->async_input_callback) return; char *input = NULL; - while ((input = gb->async_input_callback(gb))) { + while (gb->async_input_callback && (input = gb->async_input_callback(gb))) { GB_debugger_do_command(gb, input); free(input); }