From d632474b743a50a2d9d24a04a7f2e14f7e3ba0ee Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 16 Sep 2013 13:06:13 -0400 Subject: [PATCH] Don't pass NULL to gdk_window_set_title That is not allowed. This is fallout from a recent change that makes GtkWindow listen for title changes in its headerbar. --- gtk/gtkwindow.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index fb3c5c9a56..50ed413162 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1792,11 +1792,14 @@ gtk_window_set_title_internal (GtkWindow *window, g_free (priv->title); priv->title = new_title; + if (new_title == NULL) + new_title = ""; + if (gtk_widget_get_realized (widget)) - gdk_window_set_title (gtk_widget_get_window (widget), priv->title); + gdk_window_set_title (gtk_widget_get_window (widget), new_title); if (priv->titlebar != NULL && update_titlebar) - gtk_header_bar_set_title (GTK_HEADER_BAR (priv->titlebar), priv->title); + gtk_header_bar_set_title (GTK_HEADER_BAR (priv->titlebar), new_title); g_object_notify (G_OBJECT (window), "title"); }