Skip to content

Commit

Permalink
- fixed: The light defaults were not fully deleted on an engine restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 15, 2018
1 parent faa4bb4 commit 1aba331
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/d_main.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/g_shared/a_dynlight.h
Expand Up @@ -85,7 +85,7 @@ class FLightDefaults
}

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 };
Expand Down
2 changes: 1 addition & 1 deletion src/r_data/gldefs.cpp
Expand Up @@ -1758,7 +1758,7 @@ void ParseGLDefs()
{
const char *defsLump = NULL;

LightDefaults.Clear();
LightDefaults.DeleteAndClear();
//gl_DestroyUserShaders(); function says 'todo'
switch (gameinfo.gametype)
{
Expand Down

0 comments on commit 1aba331

Please sign in to comment.