diff src/video/x11/SDL_x11video.c @ 3521:76f9b76ddf0f

Don't add any renderers if you can't add any displays
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Dec 2009 09:01:48 +0000
parents 81773a1eac83
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c	Fri Dec 04 08:45:08 2009 +0000
+++ b/src/video/x11/SDL_x11video.c	Fri Dec 04 09:01:48 2009 +0000
@@ -255,7 +255,9 @@
     data->WM_DELETE_WINDOW =
         XInternAtom(data->display, "WM_DELETE_WINDOW", False);
 
-    X11_InitModes(_this);
+    if (X11_InitModes(_this) < 0) {
+        return -1;
+    }
 
 #if SDL_VIDEO_RENDER_X11
     X11_AddRenderDriver(_this);