From 6f5180a9157bc935d119a03608880125fb02b4f6 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 8 Mar 2022 07:21:44 +0000 Subject: [PATCH] Fix q3plug-related crashes. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6221 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 548fd3b0c..f6b92102b 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1253,7 +1253,8 @@ void CL_CheckForResend (void) if (!connectinfo.clogged) { #ifdef Q3CLIENT - q3->cl.SendAuthPacket(cls.sockets, to); + if (q3) + q3->cl.SendAuthPacket(cls.sockets, to); #endif if (connectinfo.istransfer || connectinfo.numadr>1) @@ -1284,7 +1285,7 @@ void CL_CheckForResend (void) { contype |= 1; /*always try qw type connections*/ #ifdef VM_UI - if (!q3->ui.IsRunning()) //don't try to connect to nq servers when running a q3ui. I was getting annoying error messages from q3 servers due to this. + if (!(q3&&q3->ui.IsRunning())) //don't try to connect to nq servers when running a q3ui. I was getting annoying error messages from q3 servers due to this. #endif contype |= 2; /*try nq connections periodically (or if its the default nq port)*/ }