mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 23:37:43 +08:00
perf(line): check that line has at least 2 points before drawing (#9185)
This commit is contained in:
@@ -227,7 +227,7 @@ static void lv_line_event(const lv_obj_class_t * class_p, lv_event_t * e)
|
||||
lv_line_t * line = (lv_line_t *)obj;
|
||||
lv_layer_t * layer = lv_event_get_layer(e);
|
||||
|
||||
if(line->point_num == 0 || line->point_array.constant == NULL) return;
|
||||
if(line->point_num < 2 || line->point_array.constant == NULL) return;
|
||||
|
||||
lv_area_t area;
|
||||
lv_obj_get_coords(obj, &area);
|
||||
|
||||
Reference in New Issue
Block a user