aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/android/texture.cpp')
-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() {