Skip to content

Commit

Permalink
Fix menu crash due to lack of favourites list
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed Jun 22, 2014
1 parent 9056c16 commit 2625323
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin/mainmenu/tab_multiplayer.lua
Expand Up @@ -138,6 +138,12 @@ local function main_button_handler(tabview, fields, name, tabdata)
else
fav_idx = 1
end

if menudata.favorites == nil or
menudata.favorites[fav_idx] == nil then
tabdata.fav_selected = 0
return true
end

local address = menudata.favorites[fav_idx].address
local port = menudata.favorites[fav_idx].port
Expand Down

0 comments on commit 2625323

Please sign in to comment.