From: Ignacio Casal Quinteiro Date: Wed, 18 Mar 2020 15:51:12 +0000 (+0100) Subject: Do not try to get the attachment if the node is NULL X-Git-Tag: v1.4~24 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b03428cd6b50352ad50ddf9b8873af2d2dc901b0;p=pidgin-chime.git Do not try to get the attachment if the node is NULL This fixes lots of warnings when trying to get the attachments --- diff --git a/prpl/attachments.c b/prpl/attachments.c index 208e753..0621cbc 100644 --- a/prpl/attachments.c +++ b/prpl/attachments.c @@ -159,7 +159,7 @@ ChimeAttachment *extract_attachment(JsonNode *record) robj = json_node_get_object(record); g_return_val_if_fail(robj != NULL, NULL); node = json_object_get_member(robj, "Attachment"); - if (!node) + if (!node || json_node_is_null(node)) return NULL; g_return_val_if_fail(parse_string(record, "MessageId", &msg_id), NULL);