fix divisioin by zero in draw_pattern (lv_draw_rect.c) if the image or letter is not found

This commit is contained in:
Gabor Kiss-Vamosi
2020-09-14 12:21:19 +02:00
parent d44b8d47d3
commit b947465da1
2 changed files with 4 additions and 0 deletions

View File

@@ -1229,6 +1229,9 @@ static void draw_pattern(const lv_area_t * coords, const lv_area_t * clip, const
return;
}
/*Can't draw zero sized images*/
if(img_w == 0 || img_h == 0) return;
lv_area_t coords_tmp;
if(dsc->pattern_repeat) {