Skip to content

Commit

Permalink
Fix error from invalid entity in OnEntityDestroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed Jan 7, 2025
1 parent 903f3d8 commit 777a7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/superzombiefortress.sp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ public void OnEntityCreated(int iEntity, const char[] sClassname)

public void OnEntityDestroyed(int iEntity)
{
if (!g_bEnabled)
if (!g_bEnabled || iEntity == INVALID_ENT_REFERENCE)
return;

char sClassname[256];
Expand Down

0 comments on commit 777a7a5

Please sign in to comment.