summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@openedhand.com>2008-01-29 18:18:01 +0000
committerEmmanuele Bassi <ebassi@openedhand.com>2008-01-29 18:18:01 +0000
commit48079c2f580171235eecc298b0193022a67e0b79 (patch)
treee5d0ca68449364d639140def154f25a4613da590 /json-glib/json-gobject.c
parenta86a300fdc256ad4270881cf9b7b97367cd87c87 (diff)
downloadjson-glib-48079c2f580171235eecc298b0193022a67e0b79.tar.gz
Update after the JsonParser::get_root change
Do not free the root node returned by the get_root() method in the JSON-GObject API and in the JsonParser tests.
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r--json-glib/json-gobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 0526283..b0a0e13 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -581,7 +581,7 @@ json_construct_gobject (GType gtype,
}
root = json_parser_get_root (parser);
- if (JSON_NODE_TYPE (root) != JSON_NODE_OBJECT)
+ if (root == NULL || JSON_NODE_TYPE (root) != JSON_NODE_OBJECT)
{
g_set_error (error, JSON_PARSER_ERROR,
JSON_PARSER_ERROR_PARSE,
@@ -652,8 +652,6 @@ json_construct_gobject (GType gtype,
g_list_free (members);
- json_node_free (root);
-
g_object_thaw_notify (retval);
g_type_class_unref (klass);