mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 20:57:01 +08:00
fix(canvas): fix buf copy assert msg error (#6063)
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
This commit is contained in:
@@ -252,7 +252,7 @@ void lv_canvas_copy_buf(lv_obj_t * obj, const lv_area_t * canvas_area, lv_draw_b
|
|||||||
lv_canvas_t * canvas = (lv_canvas_t *)obj;
|
lv_canvas_t * canvas = (lv_canvas_t *)obj;
|
||||||
if(canvas->draw_buf == NULL) return;
|
if(canvas->draw_buf == NULL) return;
|
||||||
|
|
||||||
LV_ASSERT_MSG(canvas->draw_buf->header.cf != dest_buf->header.cf, "Color formats must be the same");
|
LV_ASSERT_MSG(canvas->draw_buf->header.cf == dest_buf->header.cf, "Color formats must be the same");
|
||||||
|
|
||||||
lv_draw_buf_copy(canvas->draw_buf, canvas_area, dest_buf, dest_area);
|
lv_draw_buf_copy(canvas->draw_buf, canvas_area, dest_buf, dest_area);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user