Commit 8463d728 authored by gbazin's avatar gbazin
Browse files

* modules/video_output/x11/glx.c: don't call XCloseDisplay() if p_display == NULL.

parent 852f3863
......@@ -185,7 +185,6 @@ static int CheckGLX( vlc_object_t *p_this, vlc_bool_t *b_glx13 )
if( !p_display )
{
msg_Err( p_this, "Cannot open display" );
XCloseDisplay( p_display );
return VLC_EGENERIC;
}
......@@ -207,10 +206,7 @@ static int CheckGLX( vlc_object_t *p_this, vlc_bool_t *b_glx13 )
if (!glXQueryVersion( p_display, &i_maj, &i_min ) )
{
msg_Err( p_this, "glXQueryVersion failed" );
if( p_display != NULL )
{
XCloseDisplay( p_display );
}
XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if( i_maj <= 0 || ((i_maj == 1) && (i_min < 3)) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment