aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 31eb60f62b..a8adb0404b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3451,7 +3451,7 @@ CPUArchState *cpu_copy(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
CPUState *new_cpu = cpu_init(cpu_model);
- CPUArchState *new_env = cpu->env_ptr;
+ CPUArchState *new_env = new_cpu->env_ptr;
CPUBreakpoint *bp;
CPUWatchpoint *wp;