From c122485e53a083d556ecb0929820025d5b00d24d Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 14 Nov 2016 18:12:31 +1100 Subject: [PATCH] [Glitch] Clean up aResolutionsStr --- Source/Glitch64/OGLglitchmain.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/Glitch64/OGLglitchmain.cpp b/Source/Glitch64/OGLglitchmain.cpp index a0d6ea674..96683e994 100644 --- a/Source/Glitch64/OGLglitchmain.cpp +++ b/Source/Glitch64/OGLglitchmain.cpp @@ -122,9 +122,18 @@ FullScreenResolutions::~FullScreenResolutions() for (unsigned int i = 0; i < dwNumResolutions; i++) { delete[] aResolutionsStr[i]; + aResolutionsStr[i] = NULL; + } + if (aResolutionsStr) + { + delete[] aResolutionsStr; + aResolutionsStr = NULL; + } + if (aResolutions) + { + delete[] aResolutions; + aResolutions = NULL; } - delete[] aResolutionsStr; - delete[] aResolutions; } void FullScreenResolutions::init()