aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 46a283071a..0a96ddbc93 100644
--- a/exec.c
+++ b/exec.c
@@ -260,7 +260,7 @@ CPUState *qemu_get_cpu(int index)
env = env->next_cpu;
}
- return cpu;
+ return env ? cpu : NULL;
}
void cpu_exec_init(CPUArchState *env)