From d72946a3ddcba685472b3f4b76c70dff00133d78 Mon Sep 17 00:00:00 2001 From: Barichello Date: Thu, 20 Jan 2022 17:26:38 -0300 Subject: Fix crash when changing remote from an empty masterserver --- Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut index 0f96d2e4..194c0831 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -828,7 +828,7 @@ void function DisplayFocusedServerInfo( int scriptID) { if (scriptID == 999 || scriptID == -1 || scriptID == 16) return - if ( NSIsRequestingServerList() || NSGetServerCount() == 0 || file.serverListRequestFailed ) + if ( NSIsRequestingServerList() || NSGetServerCount() == 0 || file.serverListRequestFailed || file.serversArrayFiltered.len() == 0) return var menu = GetMenu( "ServerBrowserMenu" ) @@ -843,9 +843,7 @@ void function DisplayFocusedServerInfo( int scriptID) // text panels Hud_SetVisible( Hud_GetChild( menu, "LabelDescription" ), true ) Hud_SetVisible( Hud_GetChild( menu, "LabelMods" ), false ) - //RuiSetGameTime( textRui, "startTime", -99999.99 ) // make sure it skips the whole animation for showing this Hud_SetText( Hud_GetChild( menu, "LabelDescription" ), NSGetServerDescription( file.serversArrayFiltered[ serverIndex ].serverIndex ) + "\n\nRequired Mods:\n" + FillInServerModsLabel( file.serversArrayFiltered[ serverIndex ].serverIndex )) - //Hud_SetText( Hud_GetChild( menu, "LabelMods" ), FillInServerModsLabel( file.serversArrayFiltered[ serverIndex ].serverIndex ) ) // map name/image/server name string map = file.serversArrayFiltered[ serverIndex ].serverMap -- cgit v1.2.3