From fb4f6406c94c03c307d75e549ffba18af43fde1b Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 26 May 2010 08:30:13 -0400 Subject: [PATCH] Fixed SDKTools sm_dump_datamaps crash on improperly created entities (bug 4424, r=pred) --- extensions/sdktools/vhelpers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/sdktools/vhelpers.cpp b/extensions/sdktools/vhelpers.cpp index 0f6035c6..1dccaf2e 100644 --- a/extensions/sdktools/vhelpers.cpp +++ b/extensions/sdktools/vhelpers.cpp @@ -811,6 +811,11 @@ CON_COMMAND(sm_dump_datamaps, "Dumps the data map list as a text file") typedescription_t *datamap = gamehelpers->FindInDataMap(pMap, "m_iEFlags"); + if (!datamap) + { + continue; + } + int *eflags = (int *)((char *)entity->GetBaseEntity() + datamap->fieldOffset[TD_OFFSET_NORMAL]); *eflags |= (1<<0); // EFL_KILLME }