From 0d72da2893f7ce9f5e5c46127d5d293d3ec34f8b Mon Sep 17 00:00:00 2001 From: jsalmon3 <> Date: Tue, 19 Nov 2002 19:55:01 +0000 Subject: [PATCH] Fixed bug #640812: Flameshield segfault --- doc/ChangeLog.html | 1 + src/unit/unit.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 99e0667fb..a53cfd93c 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -984,6 +984,7 @@ <LI>Implemented tab completion for chatting (from Nehal Mistry). <LI>Middle-click pastes from clipboard(Win32) or cut buffer(X11) in input boxes (from Nehal Mistry). + <LI>Fixed bug #640812: Flameshield segfault (from Jimmy Salmon). <LI>+++ </UL> </UL> diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp index 434e32f84..98e13122a 100644 --- a/src/unit/unit.cpp +++ b/src/unit/unit.cpp @@ -3222,7 +3222,7 @@ global void HitUnit(Unit* attacker,Unit* target,int damage) } if( GodMode ) { - if( attacker->Player==ThisPlayer ) { + if( attacker && attacker->Player==ThisPlayer ) { damage=255; } if( target->Player==ThisPlayer ) {