mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(menu): use LV_ASSERT_MALLOC check for new_node (#3263)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
9137840582
commit
96c4a45576
@ -204,6 +204,7 @@ void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page)
|
|||||||
/* Add a new node */
|
/* Add a new node */
|
||||||
lv_ll_t * history_ll = &(menu->history_ll);
|
lv_ll_t * history_ll = &(menu->history_ll);
|
||||||
lv_menu_history_t * new_node = _lv_ll_ins_head(history_ll);
|
lv_menu_history_t * new_node = _lv_ll_ins_head(history_ll);
|
||||||
|
LV_ASSERT_MALLOC(new_node);
|
||||||
new_node->page = page;
|
new_node->page = page;
|
||||||
menu->cur_depth++;
|
menu->cur_depth++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user