From 651a654985a50820bed817f4374cbbc83a842afa Mon Sep 17 00:00:00 2001 From: Jordan Milne Date: Fri, 11 Jan 2013 10:09:26 -0400 Subject: [PATCH] clean up our cursors during destruction --- extern/sdl4ogre/sdlinputwrapper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extern/sdl4ogre/sdlinputwrapper.cpp b/extern/sdl4ogre/sdlinputwrapper.cpp index c996924e4..190612fd8 100644 --- a/extern/sdl4ogre/sdlinputwrapper.cpp +++ b/extern/sdl4ogre/sdlinputwrapper.cpp @@ -37,6 +37,17 @@ namespace SFO if(mSDLWindow != NULL) SDL_DestroyWindow(mSDLWindow); mSDLWindow = NULL; + + CursorMap::const_iterator curs_iter = mCursorMap.begin(); + + while(curs_iter != mCursorMap.end()) + { + SDL_FreeCursor(curs_iter->second); + ++curs_iter; + } + + mCursorMap.clear(); + SDL_StopTextInput(); SDL_Quit(); }