aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authordhewg2011-03-24 21:22:44 +0100
committerdhewg2011-03-24 22:04:03 +0100
commit19c407ca69ea2b98623203948bb62d84729645b3 (patch)
treeea86cfc6ea258f0c1cd4bc59a67085d02fa20b51 /backends/platform/android
parentbcb9179a8b4128469700af62463674febf2785c6 (diff)
downloadscummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.tar.gz
scummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.tar.bz2
scummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.zip
ANDROID: Fix texture double release
Diffstat (limited to 'backends/platform/android')
-rw-r--r--backends/platform/android/texture.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index b96d6bf443..407ba0419d 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -102,10 +102,12 @@ GLESBaseTexture::~GLESBaseTexture() {
}
void GLESBaseTexture::release() {
- LOGD("Destroying texture %u", _texture_name);
+ if (_texture_name) {
+ LOGD("Destroying texture %u", _texture_name);
- GLCALL(glDeleteTextures(1, &_texture_name));
- _texture_name = 0;
+ GLCALL(glDeleteTextures(1, &_texture_name));
+ _texture_name = 0;
+ }
}
void GLESBaseTexture::reinit() {