Fix crash when accessing gamerules during mapchange (#593)
If the gamerules proxy entity doesn't exist, don't try to generate the reference for it.
This commit is contained in:
parent
89c4be525b
commit
0961e5dde3
@ -70,6 +70,7 @@ static CBaseEntity* GetGameRulesProxyEnt()
|
||||
if (proxyEntRef == -1 || (pProxy = gamehelpers->ReferenceToEntity(proxyEntRef)) == NULL)
|
||||
{
|
||||
pProxy = FindEntityByNetClass(playerhelpers->GetMaxClients(), g_szGameRulesProxy);
|
||||
if (pProxy)
|
||||
proxyEntRef = gamehelpers->EntityToReference(pProxy);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user