src/video/SDL_video.c
changeset 2869 2fe507a2ef7d
parent 2860 6ce28e5287e9
child 2875 91a7e08cd238
--- a/src/video/SDL_video.c	Sat Dec 13 13:10:53 2008 +0000
+++ b/src/video/SDL_video.c	Sat Dec 13 13:30:11 2008 +0000
@@ -658,7 +658,10 @@
     if (!mode) {
         mode = &display->desktop_mode;
     }
-    SDL_GetClosestDisplayMode(mode, &fullscreen_mode);
+    if (!SDL_GetClosestDisplayMode(mode, &fullscreen_mode)) {
+        SDL_SetError("Couldn't find display mode match");
+        return -1;
+    }
     if (SDL_memcmp
         (&fullscreen_mode, &display->fullscreen_mode,
          sizeof(fullscreen_mode)) == 0) {