From 29252b7065315dfb5b4a226f7ab7998bfd08ee65 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Sun, 9 Sep 2018 12:27:37 -0600 Subject: [PATCH] Change to an early continue for a NULL IrcUser Commit e9096505f07fc0c08a7c36f3680c1fde975d4f80 changed the behaviour in joinIrcUsers() from skipping a NULL IrcUser or an already tracked IrcUser to updating the usermodes of said IrcUser. The call to addUserMode() will call isKnownUser() which will log a warning of 'received IrcUser Nullpointer' and return false. This is safe from crashing, but shouldn't be allowed to happen. --- src/common/ircchannel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 43e1dee1..0684c665 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -180,7 +180,9 @@ void IrcChannel::joinIrcUsers(const QList &users, const QStringList & IrcUser *ircuser; for (int i = 0; i < users.count(); i++) { ircuser = users[i]; - if (!ircuser || _userModes.contains(ircuser)) { + if (!ircuser) + continue; + if (_userModes.contains(ircuser)) { if (sortedModes[i].count() > 1) { // Multiple modes received, do it one at a time // TODO Better way of syncing this without breaking protocol? -- 2.20.1