Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/vte/ChangeLog,v
retrieving revision 1.693
diff -u -p -r1.693 ChangeLog
--- ChangeLog	13 Sep 2006 21:58:26 -0000	1.693
+++ ChangeLog	18 Sep 2006 19:44:23 -0000
@@ -1,3 +1,10 @@
+2006-09-18  Ryan Lortie  <desrt@desrt.ca>
+
+	Bug 336105.
+
+	* src/vte.c: Check for the case where termcap does not exist and
+	throw up a dialog and exit instead of segfaulting.
+
 2006-09-13  Behdad Esfahbod  <behdad@gnome.org>
 
 	Bug 354024 – Suppress multiple warnings for missing control sequence
Index: src/vte.c
===================================================================
RCS file: /cvs/gnome/vte/src/vte.c,v
retrieving revision 1.486
diff -u -p -r1.486 vte.c
--- src/vte.c	13 Sep 2006 21:58:26 -0000	1.486
+++ src/vte.c	18 Sep 2006 19:44:31 -0000
@@ -6573,6 +6573,24 @@ vte_terminal_set_termcap(VteTerminal *te
 		_vte_termcap_free(terminal->pvt->termcap);
 	}
 	terminal->pvt->termcap = _vte_termcap_new(terminal->pvt->termcap_path);
+
+	if (terminal->pvt->termcap == NULL) {
+		GtkWidget *dialog;
+
+		dialog = gtk_message_dialog_new (NULL,
+						 GTK_DIALOG_MODAL,
+						 GTK_MESSAGE_ERROR,
+						 GTK_BUTTONS_CLOSE,
+						 _("libvte fatal error"));
+
+		gtk_message_dialog_format_secondary_text (
+			GTK_MESSAGE_DIALOG (dialog),
+			_("Unable to read the termcap database file."));
+
+		gtk_dialog_run (GTK_DIALOG (dialog));
+		exit (0);
+	}
+
 #ifdef VTE_DEBUG
 	if (_vte_debug_on(VTE_DEBUG_MISC)) {
 		fprintf(stderr, "\n");
