aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 920ccff584..b518cc4b55 100644
--- a/monitor.c
+++ b/monitor.c
@@ -140,6 +140,9 @@ static inline int monitor_ctrl_mode(const Monitor *mon)
static void monitor_read_command(Monitor *mon, int show_prompt)
{
+ if (!mon->rs)
+ return;
+
readline_start(mon->rs, "(qemu) ", 0, monitor_command_cb, NULL);
if (show_prompt)
readline_show_prompt(mon->rs);