Commit 6f2097da authored by Martin Koller's avatar Martin Koller

avoid crash when reading from connection times out

Differential Revision:
parent be739709
......@@ -212,7 +212,7 @@ void Connection::dataReceived()
} catch (const Akonadi::ProtocolException &) {
// cmd's type will be Invalid by default.
if (cmd->type() == Protocol::Command::Invalid) {
if (!cmd || (cmd->type() == Protocol::Command::Invalid)) {
qCWarning(AKONADICORE_LOG) << "Invalid command, the world is going to end!";
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