diff options
author | tallua <talluay@gmail.com> | 2021-04-06 00:18:47 +0900 |
---|---|---|
committer | tallua <talluay@gmail.com> | 2021-04-06 00:18:47 +0900 |
commit | 7f798dee2db6c32c7fae23d238e7a806b16b0f08 (patch) | |
tree | 88a6ec69ff8405103932c90a4197381e6639f4d9 /json-glib/json-node.c | |
parent | 8c4deccd80b902eb1a95c43fbf58e5a82c343d53 (diff) | |
download | json-glib-7f798dee2db6c32c7fae23d238e7a806b16b0f08.tar.gz |
set node->data pointer to null when unset
Diffstat (limited to 'json-glib/json-node.c')
-rw-r--r-- | json-glib/json-node.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/json-glib/json-node.c b/json-glib/json-node.c index a6898d9..0c8a675 100644 --- a/json-glib/json-node.c +++ b/json-glib/json-node.c @@ -143,16 +143,19 @@ json_node_unset (JsonNode *node) case JSON_NODE_OBJECT: if (node->data.object) json_object_unref (node->data.object); + node->data.object = NULL; break; case JSON_NODE_ARRAY: if (node->data.array) json_array_unref (node->data.array); + //node->data.array = NULL; break; case JSON_NODE_VALUE: if (node->data.value) json_value_unref (node->data.value); + node->data.value = NULL; break; case JSON_NODE_NULL: |