Merge c85295b5ea into dev
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- btnmatrix: hadle combined states of buttons (e.g. chacked + disabled)
|
- btnmatrix: hadle combined states of buttons (e.g. chacked + disabled)
|
||||||
- textarea: fix typo in lv_textarea_set_sscrollbar_mode
|
- textarea: fix typo in lv_textarea_set_sscrollbar_mode
|
||||||
- gauge: fix image needle drawing
|
- gauge: fix image needle drawing
|
||||||
|
- fix using freed memory in _lv_style_list_remove_style
|
||||||
|
|
||||||
|
|
||||||
## v7.2.0 (21.07.2020)
|
## v7.2.0 (21.07.2020)
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ void _lv_style_list_remove_style(lv_style_list_t * list, lv_style_t * style)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_style_t ** new_classes = lv_mem_realloc(list->style_list, sizeof(lv_style_t *) * (list->style_cnt - 1));
|
lv_style_t ** new_classes = lv_mem_alloc(sizeof(lv_style_t *) * (list->style_cnt - 1));
|
||||||
LV_ASSERT_MEM(new_classes);
|
LV_ASSERT_MEM(new_classes);
|
||||||
if(new_classes == NULL) {
|
if(new_classes == NULL) {
|
||||||
LV_LOG_WARN("lv_style_list_remove_style: couldn't reallocate class list");
|
LV_LOG_WARN("lv_style_list_remove_style: couldn't reallocate class list");
|
||||||
@@ -271,6 +271,8 @@ void _lv_style_list_remove_style(lv_style_list_t * list, lv_style_t * style)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lv_mem_free(list->style_list);
|
||||||
|
|
||||||
list->style_cnt--;
|
list->style_cnt--;
|
||||||
list->style_list = new_classes;
|
list->style_list = new_classes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -570,7 +570,7 @@ bool lv_debug_check_style_list(const lv_style_list_t * list);
|
|||||||
* lv_style_init(&my_style);
|
* lv_style_init(&my_style);
|
||||||
* lv_style_copy(&my_style, &style_to_copy);
|
* lv_style_copy(&my_style, &style_to_copy);
|
||||||
*/
|
*/
|
||||||
#define LV_STYLE_CREATE(name, copy_p) static lv_style_t name; lv_style_init(&name); lv_style_copy(&name, copy);
|
#define LV_STYLE_CREATE(name, copy_p) static lv_style_t name; lv_style_init(&name); lv_style_copy(&name, copy_p);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user