mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-13 18:28:52 +01:00
BUG correction: double free of menu memory
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
0e831fcd66
commit
c96bd40a9b
@ -154,9 +154,6 @@ void MenuMode::end( )
|
|||||||
SDL_FreeSurface(menu_zone_surfaces[i]);
|
SDL_FreeSurface(menu_zone_surfaces[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(idx_menus);
|
|
||||||
nb_menu_zones = 0;
|
|
||||||
|
|
||||||
if(backup_hw_screen != NULL){
|
if(backup_hw_screen != NULL){
|
||||||
SDL_FreeSurface(backup_hw_screen);
|
SDL_FreeSurface(backup_hw_screen);
|
||||||
}
|
}
|
||||||
@ -164,6 +161,13 @@ void MenuMode::end( )
|
|||||||
SDL_FreeSurface(img_arrow_top);
|
SDL_FreeSurface(img_arrow_top);
|
||||||
SDL_FreeSurface(img_arrow_bottom);
|
SDL_FreeSurface(img_arrow_bottom);
|
||||||
|
|
||||||
|
/// ------ Free Menu memory and reset vars -----
|
||||||
|
if(idx_menus){
|
||||||
|
free(idx_menus);
|
||||||
|
}
|
||||||
|
idx_menus=NULL;
|
||||||
|
nb_menu_zones = 0;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user