From 371a8755c2bc9196a6e73dc5e4174fdbae8c5056 Mon Sep 17 00:00:00 2001 From: svdijk Date: Sat, 20 May 2017 21:50:52 +0200 Subject: [PATCH] vid_glswfb: Prevent defunct windows. --- src/posix/sdl/sdlglvideo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index e2318a1fb..6401e52cf 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -255,7 +255,10 @@ DFrameBuffer *SDLGLVideo::CreateFrameBuffer (int width, int height, bool bgra, b { fb = (SDLBaseFB*)CreateGLSWFrameBuffer(width, height, bgra, fullscreen); if (!fb->IsValid()) + { + delete fb; fb = new SDLFB(width, height, bgra, fullscreen, nullptr); + } } retry = 0;