mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-23 07:46:36 +08:00
fix(freetype_image): dereference null pointer (#8307)
Signed-off-by: zhouxingjian <zhouxingjian@xiaomi.com>
This commit is contained in:
@@ -187,6 +187,12 @@ static bool freetype_image_create_cb(lv_freetype_image_cache_data_t * data, void
|
||||
uint32_t pitch = glyph_bitmap->bitmap.pitch;
|
||||
uint32_t stride = lv_draw_buf_width_to_stride(box_w, col_format);
|
||||
data->draw_buf = lv_draw_buf_create_ex(font_draw_buf_handlers, box_w, box_h, col_format, stride);
|
||||
if(!data->draw_buf) {
|
||||
LV_LOG_WARN("Could not create draw buffer");
|
||||
FT_Done_Glyph(glyph);
|
||||
LV_PROFILER_FONT_END;
|
||||
return false;
|
||||
}
|
||||
lv_draw_buf_clear(data->draw_buf, NULL);
|
||||
|
||||
for(int y = 0; y < box_h; ++y) {
|
||||
|
||||
Reference in New Issue
Block a user