src/video/x11/SDL_x11opengl.c
changeset 2178 114a541cfae2
parent 2105 12bcd4fd2606
child 2243 5523312f311e
--- a/src/video/x11/SDL_x11opengl.c	Thu Jul 12 05:32:07 2007 +0000
+++ b/src/video/x11/SDL_x11opengl.c	Thu Jul 12 06:31:36 2007 +0000
@@ -426,8 +426,15 @@
 
     if (!context) {
         SDL_SetError("Could not create GL context");
+        return NULL;
     }
-    return (SDL_GLContext) context;
+
+    if (X11_GL_MakeCurrent(_this, window, context) < 0) {
+        X11_GL_DeleteContext(_this, context);
+        return NULL;
+    }
+
+    return context;
 }
 
 int