Skip to content

Commit

Permalink
Fixed bug 4426 - allows re-creation of software renderer
Browse files Browse the repository at this point in the history
Switching between renderers "software -> opengl -> opengles2 -> software" fails.

"opengl -> opengles2" calls SDL_RecreateWindow() and frees "window->surface"
without marking it as "surface_invalid".
  • Loading branch information
1bsyl committed Dec 15, 2018
1 parent 1829692 commit 1ed6021
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/SDL_video.c
Expand Up @@ -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);
Expand Down

0 comments on commit 1ed6021

Please sign in to comment.