Skip to content

Commit

Permalink
Haywire: Fix a null-pointer dereference when Haywire gets hit by an i…
Browse files Browse the repository at this point in the history
…ceblock.

SVN-Revision: 6520
  • Loading branch information
Florian Forster committed Mar 2, 2010
1 parent f5f632e commit 46fcb8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/badguy/haywire.cpp
Expand Up @@ -90,7 +90,8 @@ Haywire::collision_squished(GameObject& object)
}

if (is_stunned) {
player->bounce (*this);
if (player)
player->bounce (*this);
return true;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 46fcb8c

Please sign in to comment.