diff options
author | dhewg | 2011-03-24 21:22:44 +0100 |
---|---|---|
committer | dhewg | 2011-03-24 22:04:03 +0100 |
commit | 19c407ca69ea2b98623203948bb62d84729645b3 (patch) | |
tree | ea86cfc6ea258f0c1cd4bc59a67085d02fa20b51 | |
parent | bcb9179a8b4128469700af62463674febf2785c6 (diff) | |
download | scummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.tar.gz scummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.tar.bz2 scummvm-rg350-19c407ca69ea2b98623203948bb62d84729645b3.zip |
ANDROID: Fix texture double release
-rw-r--r-- | backends/platform/android/texture.cpp | 8 |
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() { |