summaryrefslogtreecommitdiffstats
path: root/src/plist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plist.c')
-rw-r--r--src/plist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plist.c b/src/plist.c
index 5ef3144..3b0387e 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -148,8 +148,10 @@ plist_t plist_new_date(int32_t sec, int32_t usec)
void plist_free(plist_t plist)
{
- plist_free_node(plist, NULL);
- g_node_destroy(plist);
+ if (plist) {
+ plist_free_node(plist, NULL);
+ g_node_destroy(plist);
+ }
}
static void plist_copy_node(GNode * node, gpointer parent_node_ptr)