From 0d217fd4c651f2a4a7b104e477b9b8d5262f9e0a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 14 Feb 2008 15:48:31 +0000 Subject: [PATCH] - Added missing NULL pointer checks to Karate Chris's latest changes. SVN r746 (trunk) --- src/p_lnspec.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 825bbe3d3..36b4e20c7 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -903,10 +903,13 @@ FUNC(LS_Thing_SetSpecial) // [BC] { if (arg0 == 0) { - it->special = arg1; - it->args[0] = arg2; - it->args[1] = arg3; - it->args[2] = arg4; + if (it != NULL) + { + it->special = arg1; + it->args[0] = arg2; + it->args[1] = arg3; + it->args[2] = arg4; + } } else { @@ -1522,8 +1525,11 @@ FUNC(LS_Thing_SetTranslation) if (arg0 == 0) { - ok = true; - it->Translation = range==0? it->GetDefault()->Translation : range; + if (it != NULL) + { + ok = true; + it->Translation = range==0? it->GetDefault()->Translation : range; + } } else {