py/modthread: Initialize thread state nlr_top to NULL.
This ensures the check in MP_NLR_JUMP_HEAD works as expected and nlr_jump_fail gets called so we get a bit better error message. Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
This commit is contained in:
committed by
Damien George
parent
2b29b1b8f9
commit
aedaa40595
@@ -165,6 +165,7 @@ static inline void mp_thread_init_state(mp_state_thread_t *ts, size_t stack_size
|
||||
ts->gc_lock_depth = 0;
|
||||
|
||||
// There are no pending jump callbacks or exceptions yet
|
||||
ts->nlr_top = NULL;
|
||||
ts->nlr_jump_callback_top = NULL;
|
||||
ts->mp_pending_exception = MP_OBJ_NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user