xmpp_stanza_get_name: check for NULL

pull/1/head
Michael Santos 9 years ago
parent 37bd93160b
commit e82fc91bfb

@ -815,7 +815,7 @@ handle_presence(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
item = xmpp_stanza_get_next(item)) {
char *name = xmpp_stanza_get_name(item);
if (XMPPIPE_STREQ(name, "status")) {
if (name && XMPPIPE_STREQ(name, "status")) {
code = xmpp_stanza_get_attribute(item, "code");
if (code && XMPPIPE_STREQ(code, "110")) {
/* Check for nick conflict */

@ -21,7 +21,7 @@
#include <strophe.h>
#define XMPPIPE_VERSION "0.6.0"
#define XMPPIPE_VERSION "0.6.1"
#define XMPPIPE_STREQ(a,b) !strcmp((a),(b))
#define XMPPIPE_STRNEQ(a,b) strcmp((a),(b))

Loading…
Cancel
Save