about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarco Peereboom <marco@conformal.com>2010-02-20 16:57:23 +0000
committerMarco Peereboom <marco@conformal.com>2010-02-20 16:57:23 +0000
commit631147f5c03fa873545eb218a1c00ad5211d5688 (patch)
tree97fac8edfe08e6771ae20e7946cb7aae4cc4fb93
parent9ae62fa0241df862ced71574e28138c5db01241f (diff)
downloadxombrero-631147f5c03fa873545eb218a1c00ad5211d5688.tar.gz
Prevent ugly deref messages by doing things in the right order
-rw-r--r--xxxterm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xxxterm.c b/xxxterm.c
index b0b70a6..c4d1838 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -661,14 +661,12 @@ delete_tab(struct tab *t)
 
 	if (t == NULL)
 		return;
-
-	gtk_widget_destroy(t->vbox);
-	
 	TAILQ_REMOVE(&tabs, t, entry);
-	g_free(t);
-
 	if (TAILQ_EMPTY(&tabs))
 		create_new_tab(NULL, 1);
+
+	gtk_widget_destroy(t->vbox);
+	g_free(t);
 }
 
 void