From: Matt Schatz Date: Sun, 9 Sep 2018 18:27:37 +0000 (-0600) Subject: Change to an early continue for a NULL IrcUser X-Git-Tag: 0.13-rc2~33 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=29252b7065315dfb5b4a226f7ab7998bfd08ee65;ds=sidebyside 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. --- 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?