libpurple/protocols/jabber/buddy.c

branch
release-2.x.y
changeset 41398
851d7f3cce88
parent 40755
fb2056ce3c58
--- a/libpurple/protocols/jabber/buddy.c	Thu May 19 23:49:58 2022 -0500
+++ b/libpurple/protocols/jabber/buddy.c	Fri May 20 15:14:37 2022 -0500
@@ -1044,7 +1044,7 @@
 			} else if(text && purple_strequal(child->name, "NICKNAME")) {
 				/* Prefer the Nickcname to the Full Name as the serverside alias if it's not just part of the jid.
 				 * Ignore it if it's part of the jid. */
-				if (strstr(bare_jid, text) == NULL) {
+				if (bare_jid != NULL && strstr(bare_jid, text) == NULL) {
 					g_free(serverside_alias);
 					serverside_alias = g_strdup(text);
 

mercurial