mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
feat(img): do not show "no data" if src is NULL (#3510)
* feat(img):do not show "no data" if src is NULL Signed-off-by: wangxuedong <wangxuedong@xiaomi.com> * format code Signed-off-by: wangxuedong <wangxuedong@xiaomi.com>
This commit is contained in:
parent
343c61375b
commit
fcd4011f22
@ -681,6 +681,10 @@ static void draw_img(lv_event_t * e)
|
||||
|
||||
lv_draw_label(draw_ctx, &label_dsc, &obj->coords, img->src, NULL);
|
||||
}
|
||||
else if(img->src == NULL) {
|
||||
/*Do not need to draw image when src is NULL*/
|
||||
LV_LOG_WARN("draw_img: image source is NULL");
|
||||
}
|
||||
else {
|
||||
/*Trigger the error handler of image draw*/
|
||||
LV_LOG_WARN("draw_img: image source type is unknown");
|
||||
|
Loading…
x
Reference in New Issue
Block a user