diff options
author | David Turner | 2010-11-29 18:16:11 +0000 |
---|---|---|
committer | David Turner | 2010-11-29 18:16:11 +0000 |
commit | 0e90a2a808599aafeebd424cda2a8c46505e84fa (patch) | |
tree | a4b7f6fe65eee3c92a0aeb7186b59e5747ca5a55 /backends/graphics/sdl | |
parent | fe806a1aba19f6124237bddecd47b5c8a217682e (diff) | |
download | scummvm-rg350-0e90a2a808599aafeebd424cda2a8c46505e84fa.tar.gz scummvm-rg350-0e90a2a808599aafeebd424cda2a8c46505e84fa.tar.bz2 scummvm-rg350-0e90a2a808599aafeebd424cda2a8c46505e84fa.zip |
BACKENDS: Close Memory Leak of Mouse Surfaces in SDL Graphics Backend
svn-id: r54579
Diffstat (limited to 'backends/graphics/sdl')
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 6 |
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); |