--- a/hangouts_connection.c Sat Nov 12 22:03:09 2016 +1300
+++ b/hangouts_connection.c Mon Nov 14 22:29:43 2016 +1300
@@ -380,6 +380,7 @@
HangoutsAccount *ha = user_data;
@@ -390,9 +391,14 @@
res_raw = purple_http_response_get_data(response, &res_len);
- res_raw = g_strstr_len(res_raw, res_len, "\n");
- node = json_decode(res_raw, -1);
+ json_start = g_strstr_len(res_raw, res_len, "\n"); + if (json_start == NULL) { + purple_connection_error(ha->pc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, "Blank maps response"); + node = json_decode(json_start, atoi(res_raw)); sid = hangouts_json_path_query_string(node, "$[0][1][1]", NULL);
gsid = hangouts_json_path_query_string(node, "$[1][1][0].gsid", NULL);