aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 7746cc54a7..e897edea06 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -201,6 +201,12 @@ SdlGraphicsManager::~SdlGraphicsManager() {
g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this);
unloadGFXMode();
+ if (_mouseSurface)
+ SDL_FreeSurface(_mouseSurface);
+ _mouseSurface = 0;
+ if (_mouseOrigSurface)
+ SDL_FreeSurface(_mouseOrigSurface);
+ _mouseOrigSurface = 0;
g_system->deleteMutex(_graphicsMutex);
free(_currentPalette);