Debugger: Fix fetching memory

Do not dereference function parameter in async callback.

Change-Id: I9a6cebdc59579f230a5f570969c9cd1c6417edfc
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2018-11-12 13:14:50 +01:00
parent 402991498f
commit dd350d1955

View File

@@ -1452,7 +1452,7 @@ void CdbEngine::fetchMemory(MemoryAgent *agent, quint64 address, quint64 length)
StringInputStream str(args);
str << address << ' ' << length;
cmd.args = args;
cmd.callback = [&](const DebuggerResponse &response) {
cmd.callback = [=] (const DebuggerResponse &response) {
if (!agent)
return;
if (response.resultClass == ResultDone) {