diff options
author | Max Horn | 2010-11-29 16:22:04 +0000 |
---|---|---|
committer | Max Horn | 2010-11-29 16:22:04 +0000 |
commit | f0fdff21f641097ea0bd18493580b42ed12dac6a (patch) | |
tree | bca9b9b44f1f0277dbf50cc54679e44264a1fe09 /backends/platform/sdl/sdl.cpp | |
parent | df05ed1a46516f7e4d5c6e78f7f096208dbad790 (diff) | |
download | scummvm-rg350-f0fdff21f641097ea0bd18493580b42ed12dac6a.tar.gz scummvm-rg350-f0fdff21f641097ea0bd18493580b42ed12dac6a.tar.bz2 scummvm-rg350-f0fdff21f641097ea0bd18493580b42ed12dac6a.zip |
SDL: Revert r54554, and add explanatory comment (fix for bug #3121841)
svn-id: r54574
Diffstat (limited to 'backends/platform/sdl/sdl.cpp')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 561e5b2aec..8d9694b4f7 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -81,10 +81,26 @@ OSystem_SDL::OSystem_SDL() OSystem_SDL::~OSystem_SDL() { SDL_ShowCursor(SDL_ENABLE); + // Delete the various managers here. Note that the ModularBackend + // destructor would also take care of this for us. However, various + // of our managers must be deleted *before* we call SDL_Quit(). + // Hence, we perform the destruction on our own. + delete _savefileManager; + _savefileManager = 0; + delete _graphicsManager; + _graphicsManager = 0; + delete _eventManager; + _eventManager = 0; delete _eventSource; _eventSource = 0; + delete _audiocdManager; + _audiocdManager = 0; delete _mixerManager; _mixerManager = 0; + delete _timerManager; + _timerManager = 0; + delete _mutexManager; + _mutexManager = 0; #ifdef USE_OPENGL delete[] _graphicsModes; |