diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 058c87f..63c497d 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -511,6 +511,10 @@ download_named() { # Required arguments: filename url # Only works with one file at a time. local dest="$1" + # Validate arguments + if [[ -z "$dest" ]] || [[ -z "$2" ]]; then + return 1 + fi # Remove the destination file if it is empty. test -s "${cache}/${dest}" || rm -f "${cache}/${dest}" 2> /dev/null if [[ "${redownload}" == "true" ]] && [[ -e "${cache}/${dest}" ]]; then @@ -613,6 +617,9 @@ game_installer() { # Show game selection dialog game="$(ui_menu "Game Installer" "Game Installer" "Please select a game to install" "${menuList[@]}")" # Handle selection + if [[ -z "$game" ]]; then + exit 0 + fi if [[ -n "$game" ]]; then if [[ "$game" == "Donate" ]]; then open_url "https://ko-fi.com/stormux"