|
@@ -2796,6 +2796,8 @@ SDL_DestroyWindow(SDL_Window * window)
|
|
|
if (window->surface) {
|
|
|
window->surface->flags &= ~SDL_DONTFREE;
|
|
|
SDL_FreeSurface(window->surface);
|
|
|
+ window->surface = NULL;
|
|
|
+ window->surface_valid = SDL_FALSE;
|
|
|
}
|
|
|
if (_this->DestroyWindowFramebuffer) {
|
|
|
_this->DestroyWindowFramebuffer(_this, window);
|