aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-02-14 23:23:54 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-02-14 23:23:54 +0100
commit346652a80986d13fdf83705c8cf41ccdeee3f2b9 (patch)
tree7c8638db23fec41f8b3b7af3b10765e5ef880aed /builtin
parent7880ff74b65040ccb90bc30ba520d4a4215d45a0 (diff)
downloadminetest-346652a80986d13fdf83705c8cf41ccdeee3f2b9.tar.gz
minetest-346652a80986d13fdf83705c8cf41ccdeee3f2b9.tar.bz2
minetest-346652a80986d13fdf83705c8cf41ccdeee3f2b9.zip
Fix issue #2278, Connection sent before address data loading
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu/tab_multiplayer.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/mainmenu/tab_multiplayer.lua b/builtin/mainmenu/tab_multiplayer.lua
index 734cb5d3e..f4c5b22b0 100644
--- a/builtin/mainmenu/tab_multiplayer.lua
+++ b/builtin/mainmenu/tab_multiplayer.lua
@@ -198,8 +198,9 @@ local function main_button_handler(tabview, fields, name, tabdata)
return true
end
- if fields["btn_mp_connect"] ~= nil or
- fields["key_enter"] ~= nil then
+ if (fields["btn_mp_connect"] ~= nil or
+ fields["key_enter"] ~= nil) and fields["te_address"] ~= nil and
+ fields["te_port"] ~= nil then
gamedata.playername = fields["te_name"]
gamedata.password = fields["te_pwd"]