Mercurial > sdl-ios-xcode
changeset 3238:96492d29034a
David Carre to Sam
When i call the "SDL_Quit()" function, it call the func "SDL_QuitSubSystem(SDL_INIT_EVERYTHING)", which call the "SDL_VideoQuit()" function.
It's where i'm lost, this function "SDL_VideoQuit()" will recall the "SDL_Quit()" function (i don't find where it is called), which in turn recall the "SDL_QuitSubSystem(SDL_INIT_EVERYTHING)", which in turn recall "SDL_VideoQuit()", which cause a "double free" seg fault since it has been already called.
I have set the num_displays to 0 instead of 1, so it wont free it twice in the videoquit function loop.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 18 Aug 2009 03:26:53 +0000 |
parents | 916f396fe65d |
children | ab5aebd50add |
files | src/video/pandora/SDL_pandora.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/pandora/SDL_pandora.c Tue Aug 11 21:27:19 2009 +0000 +++ b/src/video/pandora/SDL_pandora.c Tue Aug 18 03:26:53 2009 +0000 @@ -91,8 +91,8 @@ /* Setup amount of available displays and current display */ - device->num_displays = 1; - device->current_display = 1; + device->num_displays = 0; + device->current_display = 0; /* Set device free function */ device->free = PND_destroy; @@ -323,6 +323,8 @@ void PND_setwindowgrab(_THIS, SDL_Window * window) { + SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; + eglTerminate(phdata->egl_display); } void PND_destroywindow(_THIS, SDL_Window * window)