diff options
author | Barichello <artur@barichello.me> | 2022-01-20 16:58:57 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-20 16:59:06 -0300 |
commit | ae5b80278e16843ecc1823fc817ea7aa0c24d843 (patch) | |
tree | be98a345c4e5104529b24ef728759f708551b9d1 /Northstar.Client/mod/scripts/vscripts/ui | |
parent | 30b25594c1bd5cfcd8aaa56c187f52deaae442a5 (diff) | |
download | NorthstarMods-ae5b80278e16843ecc1823fc817ea7aa0c24d843.tar.gz NorthstarMods-ae5b80278e16843ecc1823fc817ea7aa0c24d843.zip |
Fix serverbrowser crash on empty server list
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/ui')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 3 |
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); } |