From f007473a9fee530b64c905e15dd14048c70bb392 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 2 Sep 2018 21:13:36 +0200 Subject: [PATCH] - fixed memory leak with wipes set to pff. In this case the start screen's texture wasn't destroyed. --- src/d_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 4f023e81e..01c97b2ae 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -638,7 +638,7 @@ CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) void D_Display () { - FTexture *wipe; + FTexture *wipe = nullptr; int wipe_type; sector_t *viewsec; @@ -870,6 +870,8 @@ void D_Display () if (!wipe || NoWipe < 0 || wipe_type == wipe_None) { + if (wipe != nullptr) delete wipe; + wipe = nullptr; NetUpdate (); // send out any new accumulation // normal update // draw ZScript UI stuff