diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-23 18:43:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-23 18:43:02 +0300 |
commit | b5fdef02537733a03c352f73fe37d1e72dd1b2e8 (patch) | |
tree | 31e8d0fd210517b978a3c0e06c4059af51ba86f5 /src/graphicsmanager.cpp | |
parent | 95514a8b6c14ddc86d9b2dfe87d21534b949493d (diff) | |
download | manaplus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.gz manaplus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.bz2 manaplus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.tar.xz manaplus-b5fdef02537733a03c352f73fe37d1e72dd1b2e8.zip |
Fix memory leak in graphicsmanager.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 4 |
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 { |