2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: (json_scanner_msg_handler): Set the GError to be returned by the parsing functions into the GScanner error message handler. (json_parser_object): Return the symbol token in case we have a parse error after the member name. (json_parser_load_from_data): Propagate the error set in the message handler, if any. * clutter/json/json-node.c (json_node_free): Unref the objects only if are set, to avoid a couple of needless criticals we get on error. * tests/test-script.json: More properties.
This commit is contained in:
@ -332,11 +332,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:
|
||||
|
Reference in New Issue
Block a user