Commit 4be5cb00 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

InputFilter: check NickInfoPtr object isn't null before using it

IIUC, if the nick being checked is offline, we can get a nullptr; this also
matches how NickInfoPtr objects returned by Server::getNickInfo are used in
the code.

BUG: 437595
parent 18d932da
......@@ -712,15 +712,9 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma
else if (command == QLatin1String("account") && plHas(1))
{
NickInfoPtr nickInfo = m_server->getNickInfo(sourceNick);
QString account = parameterList.first();
if (account == QLatin1String("*"))
{
nickInfo->setAccount(QString());
}
else
{
nickInfo->setAccount(account);
if (nickInfo) {
const QString account = parameterList.at(0);
nickInfo->setAccount(account == QLatin1Char('*') ? QString() : account);
}
}
else if (command == QLatin1String("chghost") && plHas(2))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment