rocksndiamonds-3.0.4
[rocksndiamonds.git] / src / game.c
index f554e6593e1c7fce11e3201751302d7d07101a6b..750c70a91e01a7ddfaeb6f63bf296c168b6bc7e9 100644 (file)
@@ -2285,6 +2285,22 @@ void Explode(int ex, int ey, int phase, int mode)
 
   ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
 
+#ifdef DEBUG
+
+  /* activate this even in non-DEBUG version until cause for crash in
+     getGraphicAnimationFrame() (see below) is found and eliminated */
+#endif
+#if 1
+
+  if (GfxElement[x][y] == EL_UNDEFINED)
+  {
+    printf("Explode(): x = %d, y = %d: GfxElement == EL_UNDEFINED\n", x, y);
+    printf("Explode(): This should never happen!\n");
+
+    GfxElement[x][y] = EL_EMPTY;
+  }
+#endif
+
   if (phase == first_phase_after_start)
   {
     int element = Store2[x][y];