diff --git a/src/core/lv_obj_style.c b/src/core/lv_obj_style.c index d20ac7151..cf3429d2f 100644 --- a/src/core/lv_obj_style.c +++ b/src/core/lv_obj_style.c @@ -674,7 +674,7 @@ static lv_style_t * get_local_style(lv_obj_t * obj, lv_style_selector_t selector } lv_memzero(&obj->styles[i], sizeof(lv_obj_style_t)); - obj->styles[i].style = lv_malloc(sizeof(lv_style_t)); + obj->styles[i].style = lv_malloc_zeroed(sizeof(lv_style_t)); lv_style_init((lv_style_t *)obj->styles[i].style); obj->styles[i].is_local = 1;