diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7d0e44b45b3496c7ee0bc3f8a28937e0ffde2bf1..36d13fc145ccf7ccc63e4847b5f72bdfb28bf15f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2244,7 +2244,7 @@ static void Command_connect(void) // Assume we connect directly. boolean viams = false; - if (COM_Argc() < 2) + if (COM_Argc() < 2 || *COM_Argv(1) == 0) { CONS_Printf(M_GetText( "Connect <serveraddress> (port): connect to a server\n" diff --git a/src/m_menu.c b/src/m_menu.c index ea93d1e2dfea8cae98ac891d134f38816e60b489..0ab771579c288f4f7453826d3a2e649409ececac 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6295,6 +6295,13 @@ static void M_DrawConnectIPMenu(void) static void M_ConnectIP(INT32 choice) { (void)choice; + + if (*setupm_ip == 0) + { + M_StartMessage("You must specify an IP address.\n", NULL, MM_NOTHING); + return; + } + COM_BufAddText(va("connect \"%s\"\n", setupm_ip)); // A little "please wait" message.