Exit cleanly if no display is found
authorMatthias Clasen <mclasen@redhat.com>
Sun, 11 Mar 2018 12:14:14 +0000 (08:14 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 11 Mar 2018 12:14:14 +0000 (08:14 -0400)
We should not try to create an inspector window and generate
tons of ugly warnings in this case.

gtk/gtkmain.c

index 395a470c57139ad64bde4b08d7cb34b83fdb3419..336c9363aea29a5737056656f8c71893d1b6352b 100644 (file)
@@ -777,7 +777,7 @@ gtk_init_check (void)
 
   ret = gdk_display_open_default () != NULL;
 
-  if (gtk_get_debug_flags () & GTK_DEBUG_INTERACTIVE)
+  if (ret && (gtk_get_debug_flags () & GTK_DEBUG_INTERACTIVE))
     gtk_window_set_interactive_debugging (TRUE);
 
   return ret;