about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2011-12-26 14:35:57 -0600
committerMarco Peereboom <marco@conformal.com>2011-12-26 14:35:57 -0600
commitf6a3ffaf8264b9c7d5bfa2747fce9bdd5531dc1d (patch)
tree934561578a61c5635b95759fb7b5810e6a245b10
parentb034dec8fcde6fa973ae1db4e1d59fa8ff79d8fb (diff)
downloadxombrero-f6a3ffaf8264b9c7d5bfa2747fce9bdd5531dc1d.tar.gz
be more paranoid with strings
-rw-r--r--xxxterm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 2196b98..bf2198c 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -3872,9 +3872,12 @@ notify_title_cb(WebKitWebView* wview, GParamSpec* pspec, struct tab *t)
 
 	title = get_title(t, FALSE);
 	win_title = get_title(t, TRUE);
-	gtk_label_set_text(GTK_LABEL(t->label), title);
-	gtk_label_set_text(GTK_LABEL(t->tab_elems.label), title);
-	if (t->tab_id == gtk_notebook_get_current_page(notebook))
+	if (title) {
+		gtk_label_set_text(GTK_LABEL(t->label), title);
+		gtk_label_set_text(GTK_LABEL(t->tab_elems.label), title);
+	}
+
+	if (win_title && t->tab_id == gtk_notebook_get_current_page(notebook))
 		gtk_window_set_title(GTK_WINDOW(main_window), win_title);
 }