diff --git a/src/draw/sw/lv_draw_sw_letter.c b/src/draw/sw/lv_draw_sw_letter.c index 911bf3501f..2b7ab16978 100644 --- a/src/draw/sw/lv_draw_sw_letter.c +++ b/src/draw/sw/lv_draw_sw_letter.c @@ -337,8 +337,8 @@ static void freetype_outline_event_cb(lv_event_t * e) if(lv_event_get_code(e) == LV_EVENT_CREATE) { - glyph_paths = lv_malloc(sizeof(lv_draw_sw_letter_outlines_t)); - LV_ASSERT_NULL(glyph_paths); + glyph_paths = lv_malloc_zeroed(sizeof(lv_draw_sw_letter_outlines_t)); + LV_ASSERT_MALLOC(glyph_paths); glyph_paths->cur_path = lv_vector_path_create(LV_VECTOR_PATH_QUALITY_HIGH); glyph_paths->inside_path = glyph_paths->cur_path;