mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-28 22:30:49 +08:00
Merge pull request #1273 from neilabdev/hotfix/fix_roller_infinite_mode_initialization_bug
lv_roller_create cuases "divide by zero" via modulus operator for infinit scroll mode
This commit is contained in:
@@ -76,6 +76,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy)
|
|||||||
lv_mem_assert(ext);
|
lv_mem_assert(ext);
|
||||||
if(ext == NULL) return NULL;
|
if(ext == NULL) return NULL;
|
||||||
ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/
|
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*/
|
/*The signal and design functions are not copied so set them here*/
|
||||||
lv_obj_set_signal_cb(new_roller, lv_roller_signal);
|
lv_obj_set_signal_cb(new_roller, lv_roller_signal);
|
||||||
|
|||||||
Reference in New Issue
Block a user