aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-03-17 18:23:37 +0100
committerdhewg2011-03-17 19:35:57 +0100
commit2ea6380040e934802de2ed65abeb074c98304b4a (patch)
treeb8db05b530b8e80772156253b484f1a03f2dd682
parent42d3b8fcbda7793bf3ef8435db5ed78f7350cf4d (diff)
downloadscummvm-rg350-2ea6380040e934802de2ed65abeb074c98304b4a.tar.gz
scummvm-rg350-2ea6380040e934802de2ed65abeb074c98304b4a.tar.bz2
scummvm-rg350-2ea6380040e934802de2ed65abeb074c98304b4a.zip
ANDROID: Plug RGB cursor memleak
-rw-r--r--backends/platform/android/gfx.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index d7e31fcad7..ec98c35f42 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -679,10 +679,13 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
#ifdef USE_RGB_COLOR
if (format && format->bytesPerPixel > 1) {
- if (_mouse_texture != _mouse_texture_rgb)
+ if (_mouse_texture != _mouse_texture_rgb) {
LOGD("switching to rgb mouse cursor");
- _mouse_texture_rgb = new GLES5551Texture();
+ assert(!_mouse_texture_rgb);
+ _mouse_texture_rgb = new GLES5551Texture();
+ }
+
_mouse_texture = _mouse_texture_rgb;
} else {
if (_mouse_texture != _mouse_texture_palette)