1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-26 03:32:17 +00:00

nyx: fix memleak when 10 launcher items are shown

This commit is contained in:
CTCaer 2024-10-04 22:14:23 +03:00
parent 34f8692f5c
commit 9463f8aa7d

View file

@ -1440,15 +1440,15 @@ static lv_res_t _launch_more_cfg_action(lv_obj_t *btn)
static lv_res_t _win_launch_close_action(lv_obj_t * btn) static lv_res_t _win_launch_close_action(lv_obj_t * btn)
{ {
// Cleanup icons. // Cleanup icons.
for (u32 i = 0; i < 8; i++) for (u32 i = 0; i < (n_cfg.entries_5_col ? 10 : 8); i++)
{ {
lv_obj_t *btn = launch_ctxt.btn[i]; lv_obj_t *btns = launch_ctxt.btn[i];
lv_btn_ext_t *ext = lv_obj_get_ext_attr(btn); lv_btn_ext_t *ext = lv_obj_get_ext_attr(btns);
if (ext->idx) if (ext->idx)
{ {
// This gets latest object, which is the button overlay. So iterate 2 times. // This gets latest object, which is the button overlay. So iterate 2 times.
lv_obj_t * img = lv_obj_get_child(btn, NULL); lv_obj_t * img = lv_obj_get_child(btns, NULL);
img = lv_obj_get_child(btn, img); img = lv_obj_get_child(btns, img);
lv_img_dsc_t *src = (lv_img_dsc_t *)lv_img_get_src(img); lv_img_dsc_t *src = (lv_img_dsc_t *)lv_img_get_src(img);