summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-11-09 18:55:16 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-11-09 20:01:58 -0500
commit7556c58a6f21f846b97351ee2002e0b1d9236824 (patch)
tree1400636813648a4ac403217d7c67a7c06c40487b /src
parentbdc0cca890297a44c86395e27ee51cdfef5f3961 (diff)
Handle destroying NULL termcap
Diffstat (limited to 'src')
-rw-r--r--src/vtetc.c3
1 files changed, 2 insertions, 1 deletions
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);