forked from qt-creator/qt-creator
CDB: prevent possible nullptr deref.
Change-Id: I111b4620effc45f26f40880875a70d606c924f69 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user