From f1b90c1e5ff5daeee8a38ffa7b974abea9e88e44 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 11 Sep 2014 10:55:10 +0200 Subject: [PATCH] CDB: prevent possible nullptr deref. Change-Id: I111b4620effc45f26f40880875a70d606c924f69 Reviewed-by: hjk --- src/plugins/debugger/cdb/cdbengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 60cfc3d3743..421cd3387bc 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -1800,7 +1800,7 @@ void CdbEngine::handleMemory(const CdbExtensionCommandPtr &command) { QTC_ASSERT(command->cookie.canConvert(), return); const MemoryViewCookie memViewCookie = qvariant_cast(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,