mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
video: Set window->surface NULL after freeing it.
Otherwise, when SDL_CreateWindowFramebuffer() is called again, it will return the free'd surface instead of creating a new one.
This commit is contained in:
parent
eea0b0e088
commit
60435712f2
@ -2374,6 +2374,7 @@ SDL_GetWindowSurface(SDL_Window * window)
|
||||
if (window->surface) {
|
||||
window->surface->flags &= ~SDL_DONTFREE;
|
||||
SDL_FreeSurface(window->surface);
|
||||
window->surface = NULL;
|
||||
}
|
||||
window->surface = SDL_CreateWindowFramebuffer(window);
|
||||
if (window->surface) {
|
||||
|
Loading…
Reference in New Issue
Block a user