diff options
Diffstat (limited to 'backends/platform')
-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() { |