[vte] Handle destroying NULL termcap
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Handle destroying NULL termcap
- Date: Tue, 10 Nov 2009 01:03:14 +0000 (UTC)
commit 7556c58a6f21f846b97351ee2002e0b1d9236824
Author: Behdad Esfahbod <behdad behdad org>
Date: Mon Nov 9 18:55:16 2009 -0500
Handle destroying NULL termcap
src/vtetc.c | 3 ++-
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]