From c41feca5de6e1b2eb849bb8a90328e381221b786 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Tue, 29 Dec 2015 19:13:56 +0100 Subject: [PATCH] Fixed a crash if creating accelerated renderer after accessing window surface. Partially fixes Bugzilla #3196. --- src/video/SDL_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 68a5ab4568511..e5f4dc5b3d2ea 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1488,6 +1488,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) if (window->surface) { window->surface->flags &= ~SDL_DONTFREE; SDL_FreeSurface(window->surface); + window->surface = NULL; } if (_this->DestroyWindowFramebuffer) { _this->DestroyWindowFramebuffer(_this, window);