minor fixes for objects

This commit is contained in:
Gabor Kiss-Vamosi
2017-12-03 00:35:39 +01:00
parent 596b15799d
commit 03d076197f
9 changed files with 35 additions and 7 deletions

View File

@@ -90,6 +90,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy)
ext->anim_time = LV_TABVIEW_ANIM_TIME;
ext->tab_name_ptr = lv_mem_alloc(sizeof(char*));
ext->tab_name_ptr[0] = "";
ext->tab_cnt = 0;
/*The signal and design functions are not copied so set them here*/
lv_obj_set_signal_func(new_tabview, lv_tabview_signal);
@@ -503,6 +504,8 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p
lv_mem_free(ext->tab_name_ptr);
ext->tab_name_ptr = NULL;
ext->btns = NULL; /*These objects were children so they are already invalid*/
ext->content= NULL;
}
else if(sign == LV_SIGNAL_CORD_CHG) {
if(ext->content != NULL &&