aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 57ce68b6d1..ae0fdaa348 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1727,8 +1727,7 @@ static void do_loadvm(Monitor *mon, const char *name)
vm_stop(0);
- load_vmstate(mon, name);
- if (saved_vm_running)
+ if (load_vmstate(mon, name) >= 0 && saved_vm_running)
vm_start();
}