Fix null deref when connecting to port 4003 but force debug next app hasn't been selected

This commit is contained in:
TuxSH 2019-06-18 00:02:32 +02:00
parent 09b2bf5fb1
commit 39287d43e3

View File

@ -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;