summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 8f20effd..b01f62bc 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -4119,7 +4119,13 @@ static void UI_RunMenuScript(char **args) {
trap_Cmd_ExecuteText( EXEC_APPEND, cmd );
}
else if( Q_stricmp( name, "LoadAlienUpgrades" ) == 0 )
+ {
UI_LoadTremAlienUpgrades( );
+
+ //disallow the menu if it would be empty
+ if( uiInfo.tremAlienUpgradeCount <= 0 )
+ Menus_CloseAll( );
+ }
else if( Q_stricmp( name, "UpgradeToNewClass" ) == 0 )
{
if( cmd = uiInfo.tremAlienUpgradeList[ uiInfo.tremAlienUpgradeIndex ].cmd )