summaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
authorSimon Howard2014-04-09 23:55:12 -0400
committerSimon Howard2014-04-09 23:55:12 -0400
commit1b95bf7679de60d2d7888c8b13af9743b39a5f73 (patch)
treec69774323719504074351a76d4ca9592de0d2208 /src/setup
parent24a33a805b51af0dec3be1bdcffa3dc9c3f524e2 (diff)
downloadchocolate-doom-1b95bf7679de60d2d7888c8b13af9743b39a5f73.tar.gz
chocolate-doom-1b95bf7679de60d2d7888c8b13af9743b39a5f73.tar.bz2
chocolate-doom-1b95bf7679de60d2d7888c8b13af9743b39a5f73.zip
setup: Show error when server address not entered.
Don't launch the game if a server address has not been entered; show a message to the user instead. This fixes #121.
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/multiplayer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/setup/multiplayer.c b/src/setup/multiplayer.c
index b151a10d..35552349 100644
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -795,6 +795,13 @@ static void DoJoinGame(void *unused1, void *unused2)
{
execute_context_t *exec;
+ if (connect_address == NULL || strlen(connect_address) <= 0)
+ {
+ TXT_MessageBox(NULL, "Please enter a server address\n"
+ "to connect to.");
+ return;
+ }
+
exec = NewExecuteContext();
AddCmdLineParameter(exec, "-connect %s", connect_address);