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-17 12:43:57 -0500
commit0ab5f86d837c960cd314826834b358e531c6232d (patch)
treea1391ba373abf406d26d962139c229c263defe7e /src
parentc3ce709c8729269c22fc3ac46090651b549c8d15 (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);