SDL2: Eliminate a memory leak when changing resolutions with SDL_Renderer 8-bit mode.

git-svn-id: https://svn.eduke32.com/eduke32@4270 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-01-27 10:30:39 +00:00
parent 31a8bfebb6
commit 9f42ffc1ef

View file

@ -1277,12 +1277,11 @@ static void destroy_window_resources()
sdl_buffersurface = NULL;
/* We should NOT destroy the window surface. This is done automatically
when SDL_DestroyWindow or SDL_SetVideoMode is called. */
/*
if (sdl_surface)
#if SDL_MAJOR_VERSION==2
if (sdl_renderer && sdl_texture && sdl_surface)
SDL_FreeSurface(sdl_surface);
sdl_surface = NULL;
*/
#if SDL_MAJOR_VERSION==2
if (sdl_context)
SDL_GL_DeleteContext(sdl_context);
sdl_context = NULL;