From e4aac4c67a6c440ba4bec0c587aebd33b068222d Mon Sep 17 00:00:00 2001 From: Paul Vogel <48995417+pfvogel@users.noreply.github.com> Date: Fri, 3 Jan 2025 09:17:16 -0600 Subject: [PATCH] fix(tree): add NULL check (#7526) --- src/misc/lv_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/lv_tree.c b/src/misc/lv_tree.c index 81e98d7a0..7cd0ac3f7 100644 --- a/src/misc/lv_tree.c +++ b/src/misc/lv_tree.c @@ -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; } } -