mirror of
https://github.com/lvgl/lvgl.git
synced 2026-03-23 14:03:13 +08:00
fix(freetype): check if ctx is null before deleting font (#9728)
This commit is contained in:
@@ -242,6 +242,10 @@ void lv_freetype_font_delete(lv_font_t * font)
|
||||
{
|
||||
LV_ASSERT_NULL(font);
|
||||
lv_freetype_context_t * ctx = lv_freetype_get_context();
|
||||
if(!ctx) {
|
||||
/* Freetype already torn down (e.g. static destruction order). Nothing to release. */
|
||||
return;
|
||||
}
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
||||
LV_ASSERT_FREETYPE_FONT_DSC(dsc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user