projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
793459d
)
fixing crash when handling numeric reply 331 (RPL_NOTOPIC) and 332 (RPL_TOPIC) when...
author
Marcus Eggenberger
<egs@quassel-irc.org>
Sat, 4 Oct 2008 20:05:28 +0000
(22:05 +0200)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Sat, 4 Oct 2008 20:05:28 +0000
(22:05 +0200)
src/core/ircserverhandler.cpp
patch
|
blob
|
history
diff --git
a/src/core/ircserverhandler.cpp
b/src/core/ircserverhandler.cpp
index
5484d3b
..
5e3be1d
100644
(file)
--- a/
src/core/ircserverhandler.cpp
+++ b/
src/core/ircserverhandler.cpp
@@
-810,7
+810,10
@@
void IrcServerHandler::handle331(const QString &prefix, const QList<QByteArray>
return;
QString channel = serverDecode(params[0]);
return;
QString channel = serverDecode(params[0]);
- network()->ircChannel(channel)->setTopic(QString());
+ IrcChannel *chan = network()->ircChannel(channel);
+ if(chan)
+ chan->setTopic(QString());
+
emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("No topic is set for %1.").arg(channel));
}
emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("No topic is set for %1.").arg(channel));
}
@@
-822,7
+825,10
@@
void IrcServerHandler::handle332(const QString &prefix, const QList<QByteArray>
QString channel = serverDecode(params[0]);
QString topic = channelDecode(channel, params[1]);
QString channel = serverDecode(params[0]);
QString topic = channelDecode(channel, params[1]);
- network()->ircChannel(channel)->setTopic(topic);
+ IrcChannel *chan = network()->ircChannel(channel);
+ if(chan)
+ chan->setTopic(topic);
+
emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("Topic for %1 is \"%2\"").arg(channel, topic));
}
emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("Topic for %1 is \"%2\"").arg(channel, topic));
}