Skip to content

Commit

Permalink
Validate GetEntityHandle in FindEntityByNetClass (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
BotoX authored and KyleSanderson committed Nov 6, 2019
1 parent 23e1c0b commit 3dd1e5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/sdktools/gamerulesnatives.cpp
Expand Up @@ -53,6 +53,10 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname)
if (network == NULL) if (network == NULL)
continue; continue;


IHandleEntity *pHandleEnt = network->GetEntityHandle();
if (pHandleEnt == NULL)
continue;

ServerClass *sClass = network->GetServerClass(); ServerClass *sClass = network->GetServerClass();
const char *name = sClass->GetName(); const char *name = sClass->GetName();


Expand Down

0 comments on commit 3dd1e5a

Please sign in to comment.