Fixed a crash if creating accelerated renderer after accessing window surface.
Partially fixes Bugzilla #3196.
This commit is contained in:
parent
8b682f0b6c
commit
f92eac5d89
1 changed files with 1 additions and 0 deletions
|
@ -1488,6 +1488,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
|
||||||
if (window->surface) {
|
if (window->surface) {
|
||||||
window->surface->flags &= ~SDL_DONTFREE;
|
window->surface->flags &= ~SDL_DONTFREE;
|
||||||
SDL_FreeSurface(window->surface);
|
SDL_FreeSurface(window->surface);
|
||||||
|
window->surface = NULL;
|
||||||
}
|
}
|
||||||
if (_this->DestroyWindowFramebuffer) {
|
if (_this->DestroyWindowFramebuffer) {
|
||||||
_this->DestroyWindowFramebuffer(_this, window);
|
_this->DestroyWindowFramebuffer(_this, window);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue