Fixed a crash if creating accelerated renderer after accessing window surface.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 29 Dec 2015 19:13:56 +0100
changeset 998808d023f75d78
parent 9987 d64783aac765
child 9989 b01c5397d489
Fixed a crash if creating accelerated renderer after accessing window surface.

Partially fixes Bugzilla #3196.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Tue Dec 29 02:32:47 2015 -0500
     1.2 +++ b/src/video/SDL_video.c	Tue Dec 29 19:13:56 2015 +0100
     1.3 @@ -1488,6 +1488,7 @@
     1.4      if (window->surface) {
     1.5          window->surface->flags &= ~SDL_DONTFREE;
     1.6          SDL_FreeSurface(window->surface);
     1.7 +        window->surface = NULL;
     1.8      }
     1.9      if (_this->DestroyWindowFramebuffer) {
    1.10          _this->DestroyWindowFramebuffer(_this, window);