From 469b66edc8cd005916e83ec5adef1d147b575458 Mon Sep 17 00:00:00 2001 From: Igor Parfenov <54469399+ParfenovIgor@users.noreply.github.com> Date: Tue, 25 Jul 2023 21:42:57 +0300 Subject: [PATCH] fix: add assert in lv_obj_get_style_prop (#4405) Co-authored-by: Igor Parfenov --- src/core/lv_obj_style.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lv_obj_style.c b/src/core/lv_obj_style.c index 52997b911..16e0f637d 100644 --- a/src/core/lv_obj_style.c +++ b/src/core/lv_obj_style.c @@ -288,6 +288,8 @@ void lv_obj_enable_style_refresh(bool en) lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop) { + LV_ASSERT_NULL(obj) + lv_style_value_t value_act = { .ptr = NULL }; bool inheritable = lv_style_prop_has_flag(prop, LV_STYLE_PROP_FLAG_INHERITABLE); lv_style_res_t found = LV_STYLE_RES_NOT_FOUND;