From 8749877c6272b4e23b93b3ef91c0c9ba91703f8b Mon Sep 17 00:00:00 2001 From: BotoX Date: Tue, 10 Sep 2019 20:46:55 +0200 Subject: [PATCH] fix rare crash bug in SDKTools GetGameRulesProxyEnt --- extensions/sdktools/gamerulesnatives.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/sdktools/gamerulesnatives.cpp b/extensions/sdktools/gamerulesnatives.cpp index 71b5c987..1abe4241 100644 --- a/extensions/sdktools/gamerulesnatives.cpp +++ b/extensions/sdktools/gamerulesnatives.cpp @@ -53,6 +53,10 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname) if (network == NULL) continue; + IHandleEntity *pHandleEnt = network->GetEntityHandle(); + if (pHandleEnt == NULL) + continue; + ServerClass *sClass = network->GetServerClass(); const char *name = sClass->GetName();