]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
* qt DirectoryConfigControl: default open in selected directory
[vlc] / modules / gui / qt4 / qt4.cpp
index 8e522e31d7e26cef0a251d99b355c25859040135..5158d50980c8b1390f27ed014c85d24189401a77 100644 (file)
@@ -68,6 +68,13 @@ static int Open( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
     p_intf->pf_run = Run;
+#if defined HAVE_GETENV && defined Q_WS_X11
+    if( !getenv( "DISPLAY" ) )
+    {
+        msg_Err(p_intf, "no X server");
+        return VLC_EGENERIC;
+    }
+#endif
     p_intf->p_sys = (intf_sys_t *)malloc(sizeof( intf_sys_t ) );
     if( !p_intf->p_sys )
     {
@@ -124,7 +131,6 @@ static void Init( intf_thread_t *p_intf )
     char *argv[] = { "" };
     int argc = 1;
     Q_INIT_RESOURCE( vlc );
-
     QApplication *app = new QApplication( argc, argv , true );
     app->setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );
     p_intf->p_sys->p_app = app;