How is lv_tabview_clean() supposed to work?

lv_tabview_clean() in calls lv_page_get_scrl() and then cleans the returned object.

lv_page_get_scrl() gets the parameter object’s ext_attr, casts it to lv_page_ext_t * and then returns this struct’s scrl member.

But tabview’s ext_attr is of a different type, lv_tabview_ext_t, so lv_page_get_scrl() applied to tabview is bound to return a bogus pointer.

Am I overlooking something?


Jan Waclawek

lv_tabview_clean should be called on tab created by lv_tabview_add_tab.

The comments were incorrect there and the function’s name is really not that intuitive so I renamed it to lv_tabview_clean_tab in dev-7.0.

And that now makes sense :smiley: , thanks.

Can this be also backported to the head 6.x? I know it’s a PITA, but it’s still the production version after all… :slight_smile:


We can’t fully backport because API changes needs to go into a new major version. However, I’ve fixed the comments.

I see Thanks.


1 Like