mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 23:37:43 +08:00
chore(image): reduce warning level for src being NULL (#8394)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -820,6 +820,11 @@ static void draw_image(lv_event_t * e)
|
||||
|
||||
if(img->h == 0 || img->w == 0) return;
|
||||
if(img->scale_x == 0 || img->scale_y == 0) return;
|
||||
if(img->src == NULL) {
|
||||
/*Do not need to draw image when src is NULL*/
|
||||
LV_LOG_TRACE("image source is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
lv_layer_t * layer = lv_event_get_layer(e);
|
||||
|
||||
@@ -905,10 +910,6 @@ static void draw_image(lv_event_t * e)
|
||||
}
|
||||
lv_draw_label(layer, &label_dsc, coords);
|
||||
}
|
||||
else if(img->src == NULL) {
|
||||
/*Do not need to draw image when src is NULL*/
|
||||
LV_LOG_WARN("image source is NULL");
|
||||
}
|
||||
else {
|
||||
/*Trigger the error handler of image draw*/
|
||||
LV_LOG_WARN("image source type is unknown");
|
||||
|
||||
Reference in New Issue
Block a user