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

fix(draw_label): fix bug when font is not resolved may cause undefined behavior (#5122)

This commit is contained in:
Benign X 2023-12-29 10:19:44 +08:00 committed by GitHub
parent dca4b2dce9
commit 71228f0693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,7 +423,7 @@ static void draw_letter(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc,
cb(draw_unit, dsc, NULL, NULL);
if(font->release_glyph) {
if(g.resolved_font && font->release_glyph) {
font->release_glyph(font, &g);
}
LV_PROFILER_END;