Selaa lähdekoodia

Fixed a crash if creating accelerated renderer after accessing window surface.

Partially fixes Bugzilla #3196.
Philipp Wiesemann 9 vuotta sitten
vanhempi
commit
c41feca5de
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      src/video/SDL_video.c

+ 1 - 0
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);