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;