Index: vte.c
===================================================================
RCS file: /cvs/gnome/vte/src/vte.c,v
retrieving revision 1.479
diff -u -p -r1.479 vte.c
--- vte.c	16 Aug 2006 21:40:42 -0000	1.479
+++ vte.c	22 Aug 2006 18:31:06 -0000
@@ -7069,6 +7069,13 @@ vte_terminal_unrealize(GtkWidget *widget
 	}
 	terminal->pvt->im_preedit_cursor = 0;
 
+	/* Clean up our draw structure. */
+	if (terminal->pvt->draw != NULL) {
+		_vte_draw_free(terminal->pvt->draw);
+	}
+	terminal->pvt->draw = NULL;
+	terminal->pvt->has_fonts = FALSE;
+
 	/* Unmap the widget if it hasn't been already. */
 	if (GTK_WIDGET_MAPPED(widget)) {
 	  
