1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-02-02 15:08:15 -05:00

Handle NULL node

This commit is contained in:
James Booth 2013-01-21 02:29:55 +00:00
parent df790e247c
commit b16c79966e

View File

@ -1118,7 +1118,7 @@ _disco_request_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
char *node_str = xmpp_stanza_get_attribute(incoming_query, STANZA_ATTR_NODE);
char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
if (from != NULL) {
if (from != NULL && node_str != NULL) {
xmpp_stanza_t *response = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(response, STANZA_NAME_IQ);
xmpp_stanza_set_id(response, xmpp_stanza_get_id(stanza));