Add missing error check for cpu_add_thread()

This commit is contained in:
Rodrigo Arias 2023-02-21 15:39:24 +01:00 committed by Rodrigo Arias Mallo
parent 1e39bea929
commit 7dbd5d4228

View File

@ -42,7 +42,10 @@ pre_thread_execute(struct emu *emu, struct thread *th)
/* And then add the thread to the CPU, so tracking channels see the /* And then add the thread to the CPU, so tracking channels see the
* updated thread state */ * updated thread state */
cpu_add_thread(cpu, th); if (cpu_add_thread(cpu, th) != 0) {
err("cpu_add_thread failed");
return -1;
}
return 0; return 0;
} }