fixed crash bug when player was killed by explosion
authorHolger Schemel <info@artsoft.org>
Sun, 6 Feb 2022 01:56:55 +0000 (02:56 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 6 Feb 2022 02:06:05 +0000 (03:06 +0100)
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;