From 841a69d5276ad2b499fe79baf69e8246f5f7a6d5 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 23 Jun 2019 10:48:17 +0300 Subject: [PATCH] - fixed: endgame menu no longer resets player's userinfo User CVARs can be stored in member variables for quicker access Unconditional call to G_CheckDemoStatus() destructs and recreates such CVARs Dangling pointers could be accessed during the last game tick, e.g. from event handlers https://forum.zdoom.org/viewtopic.php?t=65150 --- src/menu/messagebox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index 8a2335fa7..c58b2ab94 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -135,7 +135,8 @@ void ActivateEndGameMenu() M_ClearMenus(); if (!netgame) { - G_CheckDemoStatus(); + if (demorecording) + G_CheckDemoStatus(); D_StartTitle(); } });