From 1aba33122b8c80874c17fc446742de2b7ceace66 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 15 Dec 2018 15:36:43 +0100 Subject: [PATCH] - fixed: The light defaults were not fully deleted on an engine restart. --- src/d_main.cpp | 2 +- src/g_shared/a_dynlight.h | 2 +- src/r_data/gldefs.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index b4f4c5b35..a7a0ef46a 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2709,7 +2709,7 @@ void D_DoomMain (void) DestroyCVarsFlagged(CVAR_MOD); // Delete any cvar left by mods FS_Close(); // destroy the global FraggleScript. DeinitMenus(); - LightDefaults.Clear(); // this can leak heap memory if it isn't cleared. + LightDefaults.DeleteAndClear(); // this can leak heap memory if it isn't cleared. // delete DoomStartupInfo data DoomStartupInfo.Name = (const char*)0; diff --git a/src/g_shared/a_dynlight.h b/src/g_shared/a_dynlight.h index 369b826e3..685c3a39c 100644 --- a/src/g_shared/a_dynlight.h +++ b/src/g_shared/a_dynlight.h @@ -85,7 +85,7 @@ public: } protected: - FName m_Name; + FName m_Name = NAME_None; int m_Args[5] = { 0,0,0,0,0 }; double m_Param = 0; DVector3 m_Pos = { 0,0,0 }; diff --git a/src/r_data/gldefs.cpp b/src/r_data/gldefs.cpp index 513d51094..8552ad77d 100644 --- a/src/r_data/gldefs.cpp +++ b/src/r_data/gldefs.cpp @@ -1758,7 +1758,7 @@ void ParseGLDefs() { const char *defsLump = NULL; - LightDefaults.Clear(); + LightDefaults.DeleteAndClear(); //gl_DestroyUserShaders(); function says 'todo' switch (gameinfo.gametype) {