fix(cpicker): fix division by zero

fix #1992
This commit is contained in:
Gabor Kiss-Vamosi
2021-01-06 11:53:51 +01:00
parent ae2fbdb9ef
commit 8cd07b6ff5
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## v7.9.1 (Planned at 19.01.2020
### Bugfixes
- fix(cpicker) fix division by zero
## v7.9.0 (Plann1d at 05.01.2020
### New features
+1
View File
@@ -579,6 +579,7 @@ static void draw_rect_grad(lv_obj_t * cpicker, const lv_area_t * mask)
}
lv_coord_t grad_w = lv_area_get_width(&grad_area);
if(grad_w < 1) return;
uint16_t i_step = LV_MATH_MAX(LV_CPICKER_DEF_QF, 360 / grad_w);
bg_dsc.radius = 0;
bg_dsc.border_width = 0;