diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/iphone/osys_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index ea566c3da0..a814495b80 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -77,8 +77,8 @@ OSystem_IPHONE::~OSystem_IPHONE() { delete _mixer; // Prevent accidental freeing of the screen texture here. This needs to be // checked since we might use the screen texture as framebuffer in the case - // of hi-color games for example. - if (_framebuffer.getPixels() == _videoContext->screenTexture.getPixels()) + // of hi-color games for example. Otherwise this can lead to a double free. + if (_framebuffer.getPixels() != _videoContext->screenTexture.getPixels()) _framebuffer.free(); _mouseBuffer.free(); } |