Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index c8d7869..d87ff80 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -141,7 +141,9 @@ void IRCSession::updateNickname(const QString &oldNickname, const QString &newNi | |||
141 | for (;it.current(); ++it) { | 141 | for (;it.current(); ++it) { |
142 | IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); | 142 | IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); |
143 | it.current()->removePerson(chanperson); | 143 | if (chanperson) { |
144 | chanperson->setNick(newNickname); | 144 | it.current()->removePerson(chanperson); |
145 | it.current()->addPerson(chanperson); | 145 | chanperson->setNick(newNickname); |
146 | it.current()->addPerson(chanperson); | ||
147 | } | ||
146 | } | 148 | } |
147 | 149 | ||