Fix menu crash due to lack of favourites list

master
sapier 2014-06-22 14:00:57 +02:00
parent 9056c163a7
commit 2625323f25
1 changed files with 6 additions and 0 deletions

View File

@ -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