Commit 805782a5 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Handle display_name being NULL. (#354004, Chris Wilson)

2006-09-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (post_parse_hook):
	* gdk/gdk.c (gdk_init): Handle display_name being NULL.
	(#354004, Chris Wilson)
parent f3ce0228
2006-09-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.c (post_parse_hook):
* gdk/gdk.c (gdk_init): Handle display_name being NULL.
(#354004, Chris Wilson)
2006-09-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_beep): No
......
......@@ -328,7 +328,8 @@ gdk_init (int *argc, char ***argv)
{
if (!gdk_init_check (argc, argv))
{
g_warning ("cannot open display: %s", gdk_get_display_arg_name ());
const char *display_name = gdk_get_display_arg_name ();
g_warning ("cannot open display: %s", display_name ? display_name : "");
exit(1);
}
}
......
......@@ -551,11 +551,12 @@ post_parse_hook (GOptionContext *context,
{
if (gdk_display_open_default_libgtk_only () == NULL)
{
const char *display_name = gdk_get_display_arg_name ();
g_set_error (error,
G_OPTION_ERROR,
G_OPTION_ERROR_FAILED,
"cannot open display: %s",
gdk_get_display_arg_name ());
display_name ? display_name : "" );
return FALSE;
}
......
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