From 7539d5ad70d6a46ecbf6379c48bcf87b24056a87 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Sep 2007 23:49:20 +0000 Subject: [PATCH] SVN r548 (trunk) --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 962e85c29f..70b41ea9c6 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -866,7 +866,7 @@ void AActor::CopyFriendliness (const AActor *other, bool changeTarget) flags3 = (flags3 & ~(MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)) | (other->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)); flags4 = (flags4 & ~MF4_NOHATEPLAYERS) | (other->flags4 & MF4_NOHATEPLAYERS); FriendPlayer = other->FriendPlayer; - if (changeTarget && !(other->target->flags3 & MF3_NOTARGET)) + if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET)) { // LastHeard must be set as well so that A_Look can react to the new target if called LastHeard = target = other->target;