diff options
Diffstat (limited to 'main.c')
| -rwxr-xr-x | main.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -105,12 +105,18 @@ void start_mp(supervisor_allocation* heap) { // Stack limit should be less than real stack size, so we have a chance // to recover from limit hit. (Limit is measured in bytes.) mp_stack_ctrl_init(); - mp_stack_set_limit(stack_alloc->length - 1024); + + if (stack_alloc != NULL) { + mp_stack_set_limit(stack_alloc->length - 1024); + } + #if MICROPY_MAX_STACK_USAGE // _ezero (same as _ebss) is an int, so start 4 bytes above it. - mp_stack_set_bottom(stack_alloc->ptr); - mp_stack_fill_with_sentinel(); + if (stack_alloc != NULL) { + mp_stack_set_bottom(stack_alloc->ptr); + mp_stack_fill_with_sentinel(); + } #endif // Sync the file systems in case any used RAM from the GC to cache. As soon |
