From 32ac800be60811ca433dc59a63e8aec44e4853d3 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 3 Dec 2006 17:42:56 +0000 Subject: (svn r7332) -Fix: segmentation fault, discovered by ln-, in the SDL video driver when one goes to fullscreen and there are no suitable resolutions. --- video/sdl_v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/sdl_v.c') diff --git a/video/sdl_v.c b/video/sdl_v.c index 8e997a857..b0a25a9d7 100644 --- a/video/sdl_v.c +++ b/video/sdl_v.c @@ -495,7 +495,7 @@ static void SdlVideoFullScreen(bool full_screen) { _fullscreen = full_screen; GetVideoModes(); // get the list of available video modes - if (!_video_driver->change_resolution(_cur_resolution[0], _cur_resolution[1])) { + if (_num_resolutions == 0 || !_video_driver->change_resolution(_cur_resolution[0], _cur_resolution[1])) { // switching resolution failed, put back full_screen to original status _fullscreen ^= true; } -- cgit v1.2.3-70-g09d2