From 39287d43e33594e2ba8ba29ec71801d4b7f35441 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 18 Jun 2019 00:02:32 +0200 Subject: [PATCH] Fix null deref when connecting to port 4003 but force debug next app hasn't been selected --- sysmodules/rosalina/source/gdb/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysmodules/rosalina/source/gdb/server.c b/sysmodules/rosalina/source/gdb/server.c index dbd3d7c..5be53d5 100644 --- a/sysmodules/rosalina/source/gdb/server.c +++ b/sysmodules/rosalina/source/gdb/server.c @@ -258,7 +258,7 @@ GDBContext *GDB_GetClient(GDBServer *server, u16 port) } GDB_UnlockAllContexts(server); - if (port == GDB_PORT_BASE + MAX_DEBUG) + if (port == GDB_PORT_BASE + MAX_DEBUG && ctx != NULL) { // this is not sufficient/foolproof and is buggy: TaskRunner_WaitReady(); // Finish grabbing new process debug, if anything... bool ok = false;