mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(table): fixed NULL pointer reference (#7042)
This commit is contained in:
parent
33f5f81295
commit
d34f94a1cc
@ -277,7 +277,7 @@ void lv_table_set_column_count(lv_obj_t * obj, uint32_t col_cnt)
|
||||
int32_t i;
|
||||
for(i = 0; i < (int32_t)old_col_cnt - (int32_t)col_cnt; i++) {
|
||||
uint32_t idx = old_col_start + min_col_cnt + i;
|
||||
if(table->cell_data[idx]->user_data) {
|
||||
if(table->cell_data[idx] && table->cell_data[idx]->user_data) {
|
||||
lv_free(table->cell_data[idx]->user_data);
|
||||
table->cell_data[idx]->user_data = NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user