Skip to content
Snippets Groups Projects
Commit 6d8449cd authored by iggy's avatar iggy Committed by q3k
Browse files

FIX: get the global ctx for every mpy call, otherwise it does not work after a soft reboot

parent 0d456cee
No related branches found
No related tags found
No related merge requests found
......@@ -136,9 +136,7 @@ STATIC mp_obj_t mp_version(void) {
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_version_obj, mp_version);
STATIC mp_obj_t mp_get_ctx(size_t n_args, const mp_obj_t *args) {
if (mp_ctx == NULL) {
mp_ctx = mp_ctx_from_ctx(the_ctx);
}
mp_ctx = mp_ctx_from_ctx(the_ctx);
return mp_ctx;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_get_ctx_obj, 0, 0, mp_get_ctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment