Skip to content

Commit 2625323

Browse files
sapiersapier
sapier
authored and
sapier
committed
Fix menu crash due to lack of favourites list
1 parent 9056c16 commit 2625323

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/mainmenu/tab_multiplayer.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ local function main_button_handler(tabview, fields, name, tabdata)
138138
else
139139
fav_idx = 1
140140
end
141+
142+
if menudata.favorites == nil or
143+
menudata.favorites[fav_idx] == nil then
144+
tabdata.fav_selected = 0
145+
return true
146+
end
141147

142148
local address = menudata.favorites[fav_idx].address
143149
local port = menudata.favorites[fav_idx].port

0 commit comments

Comments
 (0)