1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(tree): add NULL check (#7526)

This commit is contained in:
Paul Vogel 2025-01-03 09:17:16 -06:00 committed by GitHub
parent 29df86bef3
commit e4aac4c67a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,6 +103,7 @@ static lv_tree_node_t * _lv_tree_class_create_node(const lv_tree_class_t * class
lv_tree_node_t * lv_tree_node_create(const lv_tree_class_t * class_p, lv_tree_node_t * parent)
{
LV_ASSERT_NULL(class_p);
lv_tree_node_t * node = _lv_tree_class_create_node(class_p, parent);
LV_ASSERT_NULL(node);
_lv_tree_node_construct(node->class_p, node);
@ -184,4 +185,3 @@ bool lv_tree_walk(const lv_tree_node_t * node,
return true;
}
}