From 4bae3f99762ac7c1d602fdcc95142e10809d28ea Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 16 Jan 2015 18:58:23 -0500 Subject: [PATCH] - Fixed: SDLVideo::CreateFrameBuffer cleared "retry" too soon resulting in infinite recursion if the code was used. --- src/posix/sdl/sdlvideo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/sdl/sdlvideo.cpp b/src/posix/sdl/sdlvideo.cpp index 7a04ce901..309002456 100644 --- a/src/posix/sdl/sdlvideo.cpp +++ b/src/posix/sdl/sdlvideo.cpp @@ -286,7 +286,6 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer (int width, int height, bool fullscree } SDLFB *fb = new SDLFB (width, height, fullscreen); - retry = 0; // If we could not create the framebuffer, try again with slightly // different parameters in this order: @@ -327,6 +326,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer (int width, int height, bool fullscree ++retry; fb = static_cast(CreateFrameBuffer (width, height, fullscreen, NULL)); } + retry = 0; fb->SetFlash (flashColor, flashAmount);