Mercurial > sdl-ios-xcode
changeset 4897:c3eb55210a90
SDL_DestroyWindow is setting window->magic to NULL too early. -
window->magic is also checked in SDL_DestroyRenderer. All cleanup code
like freeing the renderer and textures is not executed.
The patch moves window_magic = NULL behind the SDL_DestroyRenderer call.
Kind regards,
André
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 27 Sep 2010 00:49:34 -0700 |
parents | d72e28642940 |
children | 164bee619400 |
files | src/video/SDL_video.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_video.c Mon Sep 27 00:48:56 2010 -0700 +++ b/src/video/SDL_video.c Mon Sep 27 00:49:34 2010 -0700 @@ -1447,7 +1447,6 @@ SDL_VideoDisplay *display; CHECK_WINDOW_MAGIC(window, ); - window->magic = NULL; if (window->title) { SDL_free(window->title); @@ -1466,6 +1465,9 @@ SDL_GL_UnloadLibrary(); } + /* Now invalidate magic */ + window->magic = NULL; + /* Unlink the window from the list */ display = window->display; if (window->next) {