From 19c407ca69ea2b98623203948bb62d84729645b3 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 24 Mar 2011 21:22:44 +0100 Subject: ANDROID: Fix texture double release --- backends/platform/android/texture.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backends/platform/android') 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() { -- cgit v1.2.3