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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403766
This commit is contained in:
parent
96e3a0d5c7
commit
5f97d85c7e
1 changed files with 4 additions and 2 deletions
|
@ -91,8 +91,8 @@ PND_create()
|
||||||
|
|
||||||
|
|
||||||
/* Setup amount of available displays and current display */
|
/* Setup amount of available displays and current display */
|
||||||
device->num_displays = 1;
|
device->num_displays = 0;
|
||||||
device->current_display = 1;
|
device->current_display = 0;
|
||||||
|
|
||||||
/* Set device free function */
|
/* Set device free function */
|
||||||
device->free = PND_destroy;
|
device->free = PND_destroy;
|
||||||
|
@ -323,6 +323,8 @@ PND_restorewindow(_THIS, SDL_Window * window)
|
||||||
void
|
void
|
||||||
PND_setwindowgrab(_THIS, SDL_Window * window)
|
PND_setwindowgrab(_THIS, SDL_Window * window)
|
||||||
{
|
{
|
||||||
|
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
|
||||||
|
eglTerminate(phdata->egl_display);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
PND_destroywindow(_THIS, SDL_Window * window)
|
PND_destroywindow(_THIS, SDL_Window * window)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue