]> www.infradead.org Git - pidgin-chime.git/commitdiff
Fix error handling in conv_membership_jugg_cb()
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 7 Feb 2018 15:12:32 +0000 (15:12 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 7 Feb 2018 15:12:32 +0000 (15:12 +0000)
... and a typo spotted while checking it.

chime-contact.c
chime-conversation.c

index 2e0c0bee6cd5815929cb5578bcdce3c7b91bd690..1d2a2a28bbb690ba3cacf8c8c4b21c1a9d473c52 100644 (file)
@@ -383,7 +383,7 @@ ChimeContact *chime_connection_parse_contact(ChimeConnection *cxn, gboolean is_c
                                      display_name, is_contact, error);
 }
 
-/* Returns a ChimeConects which is not necessarily in the contacst list,
+/* Returns a ChimeContact which is not necessarily in the contacts list,
  * and caller owns a ref on it. */
 ChimeContact *chime_connection_parse_conversation_contact(ChimeConnection *cxn,
                                                          JsonNode *node,
index 4e68acda6631f2b11e6cfa61fb8a80a3292ff042..03cfd607549249c900092bbfcc828bc45628a29a 100644 (file)
@@ -306,11 +306,11 @@ static gboolean conv_membership_jugg_cb(ChimeConnection *cxn, gpointer _conv, Js
                return FALSE;
 
        ChimeContact *member = chime_connection_parse_conversation_contact(cxn, member_node, NULL);
-       if (member_node) {
+       if (member) {
                const gchar *id = chime_contact_get_profile_id(member);
                g_hash_table_insert(conv->members, (gpointer)id, member);
                return TRUE;
-               }
+       }
        return FALSE;
 }