Skip to content

Commit

Permalink
fix crash on page delete
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jan 21, 2020
1 parent a53fca8 commit 10b9c9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lv_objx/lv_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
lv_obj_t * child;
if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/
if(ext->scrl == NULL) return LV_RES_OK;
const lv_style_t * style_bg = lv_page_get_style(page, LV_PAGE_STYLE_BG);
const lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
lv_fit_t fit_left = lv_page_get_scrl_fit_left(page);
Expand Down Expand Up @@ -1093,6 +1094,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
page_ext->sb.ver_draw = 0;
}
}
} else if(sign == LV_SIGNAL_CLEANUP) {
page_ext->scrl = NULL;
}

return res;
Expand Down

0 comments on commit 10b9c9b

Please sign in to comment.