From e130150af07860c7bce264b67653e06647e80844 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 12 May 2013 18:29:28 +0000 Subject: [PATCH] - Fixed possible NULL pointer deref in AActor::Grind(). SVN r4254 (trunk) --- src/p_mobj.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index b885b17568..c22430af21 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1062,11 +1062,12 @@ bool AActor::Grind(bool items) gib->alpha = alpha; gib->height = 0; gib->radius = 0; + + PalEntry bloodcolor = GetBloodColor(); + if (bloodcolor != 0) + gib->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } S_Sound (this, CHAN_BODY, "misc/fallingsplat", 1, ATTN_IDLE); - - PalEntry bloodcolor = GetBloodColor(); - if (bloodcolor!=0) gib->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } if (flags & MF_ICECORPSE) {