diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 76a210b..94bf902 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -414,11 +414,13 @@ game_removal() { exit 0 fi # Create the menu of installed games - local selectedGame="$(dialog --backtitle "Linux Game Manager" \ + local selectedGame + selectedGame=$(dialog --backtitle "Linux Game Manager" \ --clear \ --no-tags \ - --menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout)" - [[ $? -ne 0 ]] && exit 0 + --menu "Please select a game to delete" 0 0 0 "${menuList[@]}" --stdout) + exitCode=$? + [[ $exitCode -ne 0 ]] && exit 0 # Get the actual game file paths local gameName="${selectedGame##*/}" gameName="${gameName%.sh}"