From 7dbd5d42286bd1ff3f07f73a34451d9d80ba740e Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 21 Feb 2023 15:39:24 +0100 Subject: [PATCH] Add missing error check for cpu_add_thread() --- src/emu/ovni/event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emu/ovni/event.c b/src/emu/ovni/event.c index f815f8f..4a915b4 100644 --- a/src/emu/ovni/event.c +++ b/src/emu/ovni/event.c @@ -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 * updated thread state */ - cpu_add_thread(cpu, th); + if (cpu_add_thread(cpu, th) != 0) { + err("cpu_add_thread failed"); + return -1; + } return 0; }