aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client
diff options
context:
space:
mode:
authorBarichello <artur@barichello.me>2022-01-20 16:58:57 -0300
committerBarichello <artur@barichello.me>2022-01-20 16:59:06 -0300
commitae5b80278e16843ecc1823fc817ea7aa0c24d843 (patch)
treebe98a345c4e5104529b24ef728759f708551b9d1 /Northstar.Client
parent30b25594c1bd5cfcd8aaa56c187f52deaae442a5 (diff)
downloadNorthstarMods-ae5b80278e16843ecc1823fc817ea7aa0c24d843.tar.gz
NorthstarMods-ae5b80278e16843ecc1823fc817ea7aa0c24d843.zip
Fix serverbrowser crash on empty server list
Diffstat (limited to 'Northstar.Client')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut3
1 files changed, 2 insertions, 1 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 b0c56b65..0f96d2e4 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -785,7 +785,8 @@ void function OnServerButtonFocused( var button )
{
int scriptID = int (Hud_GetScriptID(button))
file.serverButtonFocusedID = scriptID
- file.focusedServerIndex = file.serversArrayFiltered[ file.scrollOffset + scriptID ].serverIndex
+ if ( file.serversArrayFiltered.len() > 0 )
+ file.focusedServerIndex = file.serversArrayFiltered[ file.scrollOffset + scriptID ].serverIndex
DisplayFocusedServerInfo(scriptID);
}