diff --git a/OpenRA.Mods.Common/Widgets/Logic/DirectConnectLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/DirectConnectLogic.cs index 88d8d311b0..c4e03715d2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/DirectConnectLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/DirectConnectLogic.cs @@ -39,7 +39,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic portField.Text = text.Substring(last + 1); } - panel.Get("JOIN_BUTTON").OnClick = () => + var joinButton = panel.Get("JOIN_BUTTON"); + + joinButton.IsDisabled = () => string.IsNullOrEmpty(ipField.Text); + + joinButton.OnClick = () => { var port = Exts.WithDefault(1234, () => Exts.ParseIntegerInvariant(portField.Text));