fix(sw_blend): add null pointer check for mask_area (#7251)

This commit is contained in:
Paul Vogel 2024-11-08 01:12:34 -06:00 committed by GitHub
parent f94b34fff1
commit f89ac3677e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,6 +162,7 @@ void lv_draw_sw_blend(lv_draw_unit_t * draw_unit, const lv_draw_sw_blend_dsc_t *
else image_dsc.mask_buf = blend_dsc->mask_buf;
if(image_dsc.mask_buf) {
LV_ASSERT_NULL(blend_dsc->mask_area);
image_dsc.mask_buf = blend_dsc->mask_buf;
image_dsc.mask_stride = blend_dsc->mask_stride ? blend_dsc->mask_stride : lv_area_get_width(blend_dsc->mask_area);
image_dsc.mask_buf += image_dsc.mask_stride * (blend_area.y1 - blend_dsc->mask_area->y1) +