fixed crash bug when player was killed by explosion
[rocksndiamonds.git] / src / game.c
index 87c054a211c0363e6200dd8670c984c5a90a3d21..43a0b8c2eeb12fb2086795b6f2903a68a81e9ebc 100644 (file)
@@ -5993,6 +5993,10 @@ static void Explode(int ex, int ey, int phase, int mode)
       return;
   }
 
+  // this can happen if the player was just killed by an explosion
+  if (GfxElement[x][y] == EL_UNDEFINED)
+    GfxElement[x][y] = EL_EMPTY;
+
   if (phase == last_phase)
   {
     int element;