]> git.sesse.net Git - vlc/commitdiff
GLX: minor fixes
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 10 Jan 2009 20:21:26 +0000 (22:21 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 10 Jan 2009 20:21:42 +0000 (22:21 +0200)
modules/video_output/x11/glx.c

index bdc68b018f7bd8ff9dfbcb50f6841e6e7444cda6..6ad41587895b2897ff4bd9b97bbc2673eddb18e4 100644 (file)
@@ -238,11 +238,11 @@ int InitGLX13( vout_thread_t *p_vout )
     XVisualInfo *p_vi;
     int p_attr[] = { GLX_RED_SIZE, 5, GLX_GREEN_SIZE, 5,
                      GLX_BLUE_SIZE, 5, GLX_DOUBLEBUFFER, True,
-                     GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, 0 };
+                     GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, None, };
 
     /* Get the FB configuration */
     p_fbconfs = glXChooseFBConfig( p_sys->p_display, 0, p_attr, &i_nbelem );
-    if( (i_nbelem <= 0) || !p_fbconfs )
+    if( !p_fbconfs || (i_nbelem <= 0) )
     {
         msg_Err( p_vout, "Cannot get FB configurations");
         if( p_fbconfs ) XFree( p_fbconfs );
@@ -266,6 +266,7 @@ int InitGLX13( vout_thread_t *p_vout )
     if( p_sys->gwnd == None )
     {
         msg_Err( p_vout, "Cannot create GLX window" );
+        XFree( p_fbconfs );
         return VLC_EGENERIC;
     }