fix(draw): src_buf_tmp will be NULL when LV_DRAW_COMPLEX is '0' (#3163)

This commit is contained in:
Gabriel Wang
2022-03-16 15:15:20 +00:00
committed by GitHub
parent 28bd55c5d3
commit 16a1af3873

View File

@@ -173,12 +173,14 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_c
_lv_img_buf_transform_init(&trans_dsc);
}
else {
else
#endif
{
src_buf_tmp = src_buf;
src_buf_tmp += src_stride * (draw_area.y1 - coords->y1) * px_size_byte;
src_buf_tmp += (draw_area.x1 - coords->x1) * px_size_byte;
}
#endif
uint16_t recolor_premult[3] = {0};
lv_opa_t recolor_opa_inv = 255 - draw_dsc->recolor_opa;
if(draw_dsc->recolor_opa != 0) {