From 4840310f1a428fac46a04689269c1d8a5aeb1080 Mon Sep 17 00:00:00 2001 From: pastel Date: Mon, 3 Jun 2024 14:47:27 +0000 Subject: [PATCH] Fix exitgame-ing a demo crashing the game (resolves #1237) --- src/g_demo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/g_demo.c b/src/g_demo.c index 0efba5a59..54b12f797 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -549,6 +549,9 @@ void G_ConsGhostTic(void) testmo = players[0].mo; + if (P_MobjWasRemoved(testmo)) + return; // No valid mobj exists, probably because of unexpected quit + // Grab ghost data. ziptic = READUINT8(demo_p); if (ziptic & GZT_XYZ)