aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbstub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdbstub.c b/gdbstub.c
index b92ba59e4d..5c067594ba 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2588,7 +2588,9 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
break;
}
- run_cmd_parser(s, line_buf, cmd_parser);
+ if (cmd_parser) {
+ run_cmd_parser(s, line_buf, cmd_parser);
+ }
return RS_IDLE;
}