Streamline menu callbacks

This commit is contained in:
adnano 2024-06-09 20:30:58 -04:00
commit 7d717b3696
5 changed files with 42 additions and 36 deletions

View file

@ -494,11 +494,10 @@ int menu_run(struct menu *menu) {
}
}
bool failure = menu->failure;
context_destroy(context);
menu->context = NULL;
if (failure) {
if (menu->failure) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;