1
0
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:
dpopov76 2024-10-29 04:30:08 -07:00 committed by GitHub
parent 33f5f81295
commit d34f94a1cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}