diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 4fbe6cb8..f0649328 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -3920,11 +3920,21 @@ static int UI_GetServerStatusInfo( const char *serverAddress, serverStatusInfo_t char *p, *score, *ping, *name; int i, len; + if (info) { + memset(info, 0, sizeof(*info)); + } + + // ignore initial unset addresses + if (serverAddress && *serverAddress == '\0') { + return qfalse; + } + + // reset server status request for this address if (!info) { trap_LAN_ServerStatus( serverAddress, NULL, 0); return qfalse; } - memset(info, 0, sizeof(*info)); + if ( trap_LAN_ServerStatus( serverAddress, info->text, sizeof(info->text)) ) { Q_strncpyz(info->address, serverAddress, sizeof(info->address)); p = info->text;