author | erik <erik> | 2007-01-22 23:01:41 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-22 23:01:41 (UTC) |
commit | adcf6075db477909dd8170a74862a6ef91a5127f (patch) (unidiff) | |
tree | da0a1e35c5d392271bce29e84d3af5c30a864f56 /noncore/net/opieirc | |
parent | 9b4871054d01a47b4c546952a0948553413840d6 (diff) | |
download | opie-adcf6075db477909dd8170a74862a6ef91a5127f.zip opie-adcf6075db477909dd8170a74862a6ef91a5127f.tar.gz opie-adcf6075db477909dd8170a74862a6ef91a5127f.tar.bz2 |
Each file in this commit had a problem where a function might return
a null value for a pointer and that null value was not checked.
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 2 |
1 files changed, 2 insertions, 0 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,8 +141,10 @@ 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 | if (chanperson) { | ||
143 | it.current()->removePerson(chanperson); | 144 | it.current()->removePerson(chanperson); |
144 | chanperson->setNick(newNickname); | 145 | chanperson->setNick(newNickname); |
145 | it.current()->addPerson(chanperson); | 146 | it.current()->addPerson(chanperson); |
146 | } | 147 | } |
148 | } | ||
147 | 149 | ||
148 | emit updateChannels(); | 150 | emit updateChannels(); |