eion/purple-hangouts

Parents bb02053ac862
Children f5ec16d0c65d
Fix one crash when json-glib is compiled without --enable-debug
--- a/hangouts_json.c Fri Nov 11 23:58:38 2016 +1300
+++ b/hangouts_json.c Sat Nov 12 10:12:04 2016 +1300
@@ -90,7 +90,10 @@
{
purple_debug_error("hangouts", "Error parsing JSON: %s\n", data);
} else {
- root = json_node_copy(json_parser_get_root(parser));
+ root = json_parser_get_root(parser);
+ if (root != NULL) {
+ root = json_node_copy(root);
+ }
}
g_object_unref(parser);