From 7556c58a6f21f846b97351ee2002e0b1d9236824 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 Nov 2009 18:55:16 -0500 Subject: Handle destroying NULL termcap --- src/vtetc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vtetc.c b/src/vtetc.c index fe43550..df0b527 100644 --- a/src/vtetc.c +++ b/src/vtetc.c @@ -478,7 +478,6 @@ _vte_termcap_create (const char *filename) int length; file = g_mapped_file_new (filename, FALSE, NULL); - if (file == NULL) return NULL; @@ -496,6 +495,8 @@ _vte_termcap_create (const char *filename) static void _vte_termcap_destroy (VteTermcap *termcap) { + if (!termcap) + return; g_tree_destroy (termcap->tree); g_mapped_file_free (termcap->file); g_slice_free (VteTermcap, termcap); -- cgit v1.2.3