From d7b64c18c2d0c308c1a1d9ee03c4ebab56882d72 Mon Sep 17 00:00:00 2001 From: Fyren Date: Mon, 8 Feb 2010 19:55:14 -0800 Subject: [PATCH] Fixed NULL-deref in entity handling code. --- core/smn_entities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/smn_entities.cpp b/core/smn_entities.cpp index c51336e6..38e4746d 100644 --- a/core/smn_entities.cpp +++ b/core/smn_entities.cpp @@ -119,7 +119,7 @@ bool IndexToAThings(cell_t num, CBaseEntity **pEntData, edict_t **pEdictData) if (pEdictData) { edict_t *pEdict = ::BaseEntityToEdict(pEntity); - if (pEdict->IsFree()) + if (!pEdict || pEdict->IsFree()) { pEdict = NULL; }