mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 15:11:51 +00:00
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:
parent
31a8bfebb6
commit
9f42ffc1ef
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue