From 0ab5f86d837c960cd314826834b358e531c6232d 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