fix(btnmatrix): fix crash if an empty btnmatrix is pressed

This commit is contained in:
Gabor Kiss-Vamosi
2021-12-22 19:38:55 +01:00
parent fc25194ed5
commit 2392f585bb

View File

@@ -977,6 +977,8 @@ static void invalidate_button_area(const lv_obj_t * obj, uint16_t btn_idx)
lv_area_t obj_area;
lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;;
if(btn_idx >= btnm->btn_cnt) return;
lv_area_copy(&btn_area, &btnm->button_areas[btn_idx]);
lv_obj_get_coords(obj, &obj_area);