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.
--HG--
extra : rebase_source : 83e1f3f0b41d39ac1e344dd0550212e8ce75a66f
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index bebd566..dabdd8f 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2374,6 +2374,7 @@
if (window->surface) {
window->surface->flags &= ~SDL_DONTFREE;
SDL_FreeSurface(window->surface);
+ window->surface = NULL;
}
window->surface = SDL_CreateWindowFramebuffer(window);
if (window->surface) {