Commit f1b90c1e authored by Erik Verbruggen's avatar Erik Verbruggen Committed by hjk
Browse files

CDB: prevent possible nullptr deref.



Change-Id: I111b4620effc45f26f40880875a70d606c924f69
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent c3c43d08
...@@ -1800,7 +1800,7 @@ void CdbEngine::handleMemory(const CdbExtensionCommandPtr &command) ...@@ -1800,7 +1800,7 @@ void CdbEngine::handleMemory(const CdbExtensionCommandPtr &command)
{ {
QTC_ASSERT(command->cookie.canConvert<MemoryViewCookie>(), return); QTC_ASSERT(command->cookie.canConvert<MemoryViewCookie>(), return);
const MemoryViewCookie memViewCookie = qvariant_cast<MemoryViewCookie>(command->cookie); const MemoryViewCookie memViewCookie = qvariant_cast<MemoryViewCookie>(command->cookie);
if (command->success) { if (command->success && memViewCookie.agent) {
const QByteArray data = QByteArray::fromBase64(command->reply); const QByteArray data = QByteArray::fromBase64(command->reply);
if (unsigned(data.size()) == memViewCookie.length) if (unsigned(data.size()) == memViewCookie.length)
memViewCookie.agent->addLazyData(memViewCookie.editorToken, memViewCookie.agent->addLazyData(memViewCookie.editorToken,
......
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