diff --git a/src/target/target.c b/src/target/target.c index 80e2c4cf2..b8e4c2ff9 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5131,8 +5131,10 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv) target->head = head; curr = curr->next; } - if (target->rtos) + + if (target && target->rtos) retval = rtos_smp_init(head->target); + return retval; }