Skip to content

Commit

Permalink
fix(flex): handle malloc fail (lvgl#6443)
Browse files Browse the repository at this point in the history
  • Loading branch information
aharms795 authored Jul 4, 2024
1 parent c86cea3 commit 6e65b96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extra/layouts/flex/lv_flex.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,12 @@ static void flex_update(lv_obj_t * cont, void * user_data)
}
children_repos(cont, &f, track_first_item, next_track_first_item, abs_x, abs_y, max_main_size, item_gap, &t);
track_first_item = next_track_first_item;
lv_mem_buf_release(t.grow_dsc);

if(t.grow_dsc) {
lv_mem_buf_release(t.grow_dsc);
}
t.grow_dsc = NULL;

if(rtl && !f.row) {
*cross_pos -= gap + track_gap;
}
Expand Down

0 comments on commit 6e65b96

Please sign in to comment.