From 1ed60219600562ec49eae61526f020d53c98bbe3 Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Sat, 15 Dec 2018 16:21:24 +0100 Subject: [PATCH] Fixed bug 4426 - allows re-creation of software renderer Switching between renderers "software -> opengl -> opengles2 -> software" fails. "opengl -> opengles2" calls SDL_RecreateWindow() and frees "window->surface" without marking it as "surface_invalid". --- 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 7d9bb1dfb..3d68dfd89 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1636,6 +1636,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags) window->surface->flags &= ~SDL_DONTFREE; SDL_FreeSurface(window->surface); window->surface = NULL; + window->surface_valid = SDL_FALSE; } if (_this->DestroyWindowFramebuffer) { _this->DestroyWindowFramebuffer(_this, window);