mirror of https://github.com/encounter/SDL.git
free the 'display' after it was added to global list
This commit is contained in:
parent
005e2c59a7
commit
4183211a54
|
@ -297,6 +297,10 @@ display_handle_done(void *data,
|
||||||
|
|
||||||
SDL_AddVideoDisplay(display, SDL_FALSE);
|
SDL_AddVideoDisplay(display, SDL_FALSE);
|
||||||
SDL_free(display->name);
|
SDL_free(display->name);
|
||||||
|
/* The 'display' content was copied in previous SDL_AddVideoDisplay call.
|
||||||
|
* We have to remove this reference, else it will be lost indefinitely.
|
||||||
|
*/
|
||||||
|
SDL_free(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue