1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into osx-functional

This commit is contained in:
James Booth 2016-01-13 22:27:36 +00:00
commit b6addd1583

View File

@ -983,15 +983,19 @@ _version_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza,
presence = string_from_resource_presence(occupant->presence); presence = string_from_resource_presence(occupant->presence);
} else { } else {
PContact contact = roster_get_contact(jidp->barejid); PContact contact = roster_get_contact(jidp->barejid);
Resource *resource = p_contact_get_resource(contact, jidp->resourcepart); if (contact) {
if (!resource) { Resource *resource = p_contact_get_resource(contact, jidp->resourcepart);
ui_handle_software_version_error(jidp->fulljid, "Unknown resource"); if (!resource) {
if (name_str) xmpp_free(ctx, name_str); ui_handle_software_version_error(jidp->fulljid, "Unknown resource");
if (version_str) xmpp_free(ctx, version_str); if (name_str) xmpp_free(ctx, name_str);
if (os_str) xmpp_free(ctx, os_str); if (version_str) xmpp_free(ctx, version_str);
return 0; if (os_str) xmpp_free(ctx, os_str);
return 0;
}
presence = string_from_resource_presence(resource->presence);
} else {
presence = "offline";
} }
presence = string_from_resource_presence(resource->presence);
} }
ui_show_software_version(jidp->fulljid, presence, name_str, version_str, os_str); ui_show_software_version(jidp->fulljid, presence, name_str, version_str, os_str);