[Fix] Close the info panel if it's open on exit.

This commit is contained in:
Allanis 2014-03-08 01:46:24 +00:00
parent 87ef9e5daa
commit bbf18f5a66

View File

@ -229,6 +229,7 @@ static void menu_small_close(unsigned int wid, char* str) {
*/ */
static void menu_small_exit(unsigned int wid, char* str) { static void menu_small_exit(unsigned int wid, char* str) {
(void)str; (void)str;
unsigned int info_wid;
/* If landed we must save anyway. */ /* If landed we must save anyway. */
if(landed) { if(landed) {
@ -238,6 +239,13 @@ static void menu_small_exit(unsigned int wid, char* str) {
land_cleanup(); land_cleanup();
} }
/* Close info menu if open. */
if(menu_isOpen(MENU_INFO)) {
info_wid = window_get("Info");
window_destroy(info_wid);
menu_Close(MENU_INFO);
}
window_destroy(wid); window_destroy(wid);
menu_Close(MENU_SMALL); menu_Close(MENU_SMALL);
menu_main(); menu_main();