fixed bug where mode was not properly initialized for for roller extra attributes, causing crash in inf_normalize where there is a condition executed which causes a modulas divide by zero for mode LV_ROLLER_MODE_INFINITE, which is set at random because of dirty memory

This commit is contained in:
James Whitfield
2019-11-14 19:35:24 -08:00
parent 6ebaaa6fa8
commit b9f7883b0b

View File

@@ -76,6 +76,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy)
lv_mem_assert(ext);
if(ext == NULL) return NULL;
ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/
ext->mode = LV_ROLLER_MODE_NORMAL;
/*The signal and design functions are not copied so set them here*/
lv_obj_set_signal_cb(new_roller, lv_roller_signal);