diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/stanza.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index b368dd7f..722fe4dd 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -104,7 +104,11 @@ stanza_create_roster_set(xmpp_ctx_t *ctx, const char * const jid, xmpp_stanza_t *item = xmpp_stanza_new(ctx); xmpp_stanza_set_name(item, STANZA_NAME_ITEM); xmpp_stanza_set_attribute(item, STANZA_ATTR_JID, jid); - xmpp_stanza_set_attribute(item, STANZA_ATTR_NAME, handle); + if (handle != NULL) { + xmpp_stanza_set_attribute(item, STANZA_ATTR_NAME, handle); + } else { + xmpp_stanza_set_attribute(item, STANZA_ATTR_NAME, ""); + } xmpp_stanza_add_child(query, item); xmpp_stanza_add_child(iq, query); |