summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-23 18:43:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-23 18:43:02 +0300
commitb5fdef02537733a03c352f73fe37d1e72dd1b2e8 (patch)
tree31e8d0fd210517b978a3c0e06c4059af51ba86f5 /src/graphicsmanager.cpp
parent95514a8b6c14ddc86d9b2dfe87d21534b949493d (diff)
downloadplus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.gz
plus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.bz2
plus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.xz
plus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.zip
Fix memory leak in graphicsmanager.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 13a224ba4..c57da0738 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -701,9 +701,9 @@ void GraphicsManager::updateTextureFormat() const
break;
}
}
- delete []formats;
if (compressionFormat == 3)
{
+ delete []formats;
useCompression(GL_COMPRESSED_RGBA_ARB);
return;
}
@@ -712,10 +712,12 @@ void GraphicsManager::updateTextureFormat() const
if (compressionFormat == 4
&& supportExtension("GL_ARB_texture_compression_bptc"))
{
+ delete []formats;
useCompression(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB);
return;
}
}
+ delete []formats;
}
else
{