]> git.proxmox.com Git - mirror_qemu.git/blobdiff - vl.c
vl: change runstate only if new state is different from current state
[mirror_qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index b1562d8280f0df2a245eba94670da076e1ba726c..2569dbb8d8398460b10b5c07070af73b981d4235 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -690,6 +690,10 @@ void runstate_set(RunState new_state)
 {
     assert(new_state < RUN_STATE__MAX);
 
+    if (current_run_state == new_state) {
+        return;
+    }
+
     if (!runstate_valid_transitions[current_run_state][new_state]) {
         error_report("invalid runstate transition: '%s' -> '%s'",
                      RunState_lookup[current_run_state],