CDB: prevent possible nullptr deref.

Change-Id: I111b4620effc45f26f40880875a70d606c924f69
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Erik Verbruggen
2014-09-11 10:55:10 +02:00
committed by hjk
parent c3c43d087e
commit f1b90c1e5f

View File

@@ -1800,7 +1800,7 @@ void CdbEngine::handleMemory(const CdbExtensionCommandPtr &command)
{
QTC_ASSERT(command->cookie.canConvert<MemoryViewCookie>(), return);
const MemoryViewCookie memViewCookie = qvariant_cast<MemoryViewCookie>(command->cookie);
if (command->success) {
if (command->success && memViewCookie.agent) {
const QByteArray data = QByteArray::fromBase64(command->reply);
if (unsigned(data.size()) == memViewCookie.length)
memViewCookie.agent->addLazyData(memViewCookie.editorToken,