summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
{