2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

Fixed condition in Host_Quit_Restart_f

(This doesn't fix crash when using _restart command in hlds.exe, but at least it fix crash in Host_Quit_Restart_f)
This commit is contained in:
Chuvi 2016-12-29 02:23:43 +03:00
parent b9c8be8aec
commit 500b43cd70

View File

@ -41,7 +41,7 @@ int gHostSpawnCount;
qboolean g_bMajorMapChange;
int g_iQuitCommandIssued;
char *g_pPostRestartCmdLineArgs;
char *g_pPostRestartCmdLineArgs=NULL;
/*
* Globals initialization
@ -498,7 +498,7 @@ void Host_Quit_Restart_f(void)
giActive = DLL_RESTART;
giStateInfo = 4;
if (g_psv.active || (g_pcls.state == ca_active && g_pcls.trueaddress[0] && g_pPostRestartCmdLineArgs))
if ((g_psv.active || (g_pcls.state == ca_active && g_pcls.trueaddress[0])) && g_pPostRestartCmdLineArgs)
{
Q_strcat(g_pPostRestartCmdLineArgs, " +connect ");
Q_strcat(g_pPostRestartCmdLineArgs, g_pcls.servername);