diff options
Diffstat (limited to 'json-glib/json-node.c')
-rw-r--r-- | json-glib/json-node.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/json-glib/json-node.c b/json-glib/json-node.c index 7f1e9a7..48ea3bf 100644 --- a/json-glib/json-node.c +++ b/json-glib/json-node.c @@ -330,11 +330,13 @@ json_node_free (JsonNode *node) switch (node->type) { case JSON_NODE_OBJECT: - json_object_unref (node->data.object); + if (node->data.object) + json_object_unref (node->data.object); break; case JSON_NODE_ARRAY: - json_array_unref (node->data.array); + if (node->data.array) + json_array_unref (node->data.array); break; case JSON_NODE_VALUE: |