Commit 5b73442c authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Fix potential crash in FakeAkonadiServer

mNtfCollector is null at the beginning and we only did not crash thanks to
how QObject::deleteLater() is implemented.
parent f9e4397d
......@@ -279,7 +279,9 @@ void FakeAkonadiServer::newCmdConnection(quintptr socketDescriptor)
{
mConnection = new FakeConnection(socketDescriptor);
// Delete collection in its own thread
mNtfCollector->deleteLater();
if (mNtfCollector) {
mNtfCollector->deleteLater();
}
// Connection is it's own thread, so we have to make sure we get collector
// from DataStore of the Connection's thread, not ours
......
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