Просмотр исходного кода

Don't X error in SDL_CreateWindow with unsupported GL attributes

Sven Hesse 8 лет назад
Родитель
Сommit
b89cac6761
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/video/x11/SDL_x11opengl.c

+ 3 - 1
src/video/x11/SDL_x11opengl.c

@@ -463,7 +463,9 @@ X11_GL_InitExtensions(_THIS)
         }
     }
 
-    X11_XDestroyWindow(display, w);
+    if (w) {
+        X11_XDestroyWindow(display, w);
+    }
     X11_PumpEvents(_this);
 }