From ddaf3d2b539dc436a4646b25d88005501c27e938 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Mon, 27 Jul 2015 22:08:30 +0200 Subject: [PATCH] When releasing all picture data, also clear the GDI+ bitmap object Based on TortoiseSVN revision 26619. Signed-off-by: Sven Strickroth --- src/Utils/MiscUI/Picture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Utils/MiscUI/Picture.cpp b/src/Utils/MiscUI/Picture.cpp index 2c4efe31d..08ed319f5 100644 --- a/src/Utils/MiscUI/Picture.cpp +++ b/src/Utils/MiscUI/Picture.cpp @@ -89,6 +89,9 @@ void CPicture::FreePictureData() hIcons = NULL; } delete [] lpIcons; + lpIcons = nullptr; + delete pBitmap; + pBitmap = nullptr; } // Util function to ease loading of FreeImage library -- 2.11.4.GIT