mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-10 03:48:33 +00:00
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
369e95f6d2
commit
761cbf9a8a
@ -70,7 +70,8 @@ static CBaseEntity* GetGameRulesProxyEnt()
|
||||
if (proxyEntRef == -1 || (pProxy = gamehelpers->ReferenceToEntity(proxyEntRef)) == NULL)
|
||||
{
|
||||
pProxy = FindEntityByNetClass(playerhelpers->GetMaxClients(), g_szGameRulesProxy);
|
||||
proxyEntRef = gamehelpers->EntityToReference(pProxy);
|
||||
if (pProxy)
|
||||
proxyEntRef = gamehelpers->EntityToReference(pProxy);
|
||||
}
|
||||
|
||||
return pProxy;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user