nyx: clear B button context on option actions

Fixes an issue that was causing an NULL pointer dereference when a certain access path was followed
This commit is contained in:
CTCaer 2022-03-23 00:55:18 +02:00
parent b7e59dfc28
commit 69c312daac

View file

@ -122,7 +122,6 @@ lv_obj_t *create_window_autoboot(const char *win_title)
return win;
}
// TODO: instant update of button for these.
static lv_res_t _autoboot_disable_action(lv_obj_t *btn)
{
h_cfg.autoboot = 0;
@ -136,6 +135,8 @@ static lv_res_t _autoboot_disable_action(lv_obj_t *btn)
lv_obj_del(win);
close_btn = NULL;
return LV_RES_OK;
}
@ -155,6 +156,8 @@ static lv_res_t _autoboot_enable_main_action(lv_obj_t *btn)
obj = lv_obj_get_parent(obj);
lv_obj_del(obj);
close_btn = NULL;
return LV_RES_INV;
}
@ -172,6 +175,8 @@ static lv_res_t _autoboot_enable_more_action(lv_obj_t *btn)
obj = lv_obj_get_parent(obj);
lv_obj_del(obj);
close_btn = NULL;
return LV_RES_INV;
}