diff options
-rw-r--r-- | cpus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -229,7 +229,7 @@ int64_t cpu_get_icount_raw(void) CPUState *cpu = current_cpu; icount = timers_state.qemu_icount; - if (cpu) { + if (cpu && cpu->running) { if (!cpu->can_do_io) { fprintf(stderr, "Bad icount read\n"); exit(1); |