From adcf6075db477909dd8170a74862a6ef91a5127f Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 22 Jan 2007 23:01:41 +0000 Subject: 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. --- (limited to 'noncore/net') 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 @@ -140,9 +140,11 @@ void IRCSession::updateNickname(const QString &oldNickname, const QString &newNi QListIterator it(channels); for (;it.current(); ++it) { IRCChannelPerson *chanperson = it.current()->getPerson(oldNickname); - it.current()->removePerson(chanperson); - chanperson->setNick(newNickname); - it.current()->addPerson(chanperson); + if (chanperson) { + it.current()->removePerson(chanperson); + chanperson->setNick(newNickname); + it.current()->addPerson(chanperson); + } } emit updateChannels(); -- cgit v0.9.0.2