From: bones_was_here Date: Wed, 4 Sep 2024 13:15:53 +0000 (+1000) Subject: net_slist: fix crash when there's no servers and net_slist_debug is enabled X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dfe66229824823f849c788e84f89d4b4b275d594;p=xonotic%2Fdarkplaces.git net_slist: fix crash when there's no servers and net_slist_debug is enabled The crash was introduced in 5772ed20c13d65ac46e4ba60d153287a8a631ec5. Signed-off-by: bones_was_here --- diff --git a/netconn.c b/netconn.c index f88f678d..a8fb8417 100644 --- a/netconn.c +++ b/netconn.c @@ -2646,7 +2646,7 @@ void NetConn_QueryQueueFrame(void) // Nothing else to do until the next refresh cycle. serverlist_querystage = 0; pass = 0; - if (net_slist_debug.integer) + if (net_slist_debug.integer && serverlist_cachecount) Con_Printf("^4Finished checking server timeouts in %f\n", currentrealtime - serverlist_cache[serverlist_cachecount - 1].querytime); if (serverlist_cachecount >= SERVERLIST_TOTALSIZE)