From 46fcb8cf8335e6119edfd241c51120ea2c9a4eea Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 2 Mar 2010 19:02:32 +0000 Subject: [PATCH] Haywire: Fix a null-pointer dereference when Haywire gets hit by an iceblock. SVN-Revision: 6520 --- src/badguy/haywire.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/badguy/haywire.cpp b/src/badguy/haywire.cpp index a99cb3b20..225251570 100644 --- a/src/badguy/haywire.cpp +++ b/src/badguy/haywire.cpp @@ -90,7 +90,8 @@ Haywire::collision_squished(GameObject& object) } if (is_stunned) { - player->bounce (*this); + if (player) + player->bounce (*this); return true; } @@ -106,7 +107,9 @@ Haywire::collision_squished(GameObject& object) time_stunned = TIME_STUNNED; is_stunned = true; - player->bounce (*this); + if (player) + player->bounce (*this); + return true; } -- 2.11.0