diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 726ee2e9ac..ed161d29b7 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -657,9 +657,9 @@ gtk_init (void) { if (!gtk_init_check ()) { - const char *display_name_arg = NULL; - if (display_name_arg == NULL) - display_name_arg = getenv ("DISPLAY"); + const char *display_name_arg; + + display_name_arg = getenv ("DISPLAY"); g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : ""); exit (1); }