diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 9d96a38e..a9945d88 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -348,7 +348,7 @@ bool CutterCore::asyncCmdEsil(const char *command, QSharedPointer &task) return false; } - connect(task.data(), &R2Task::finished, this, [this, task] () { + connect(task.data(), &R2Task::finished, task.data(), [this, task] () { QString res = task.data()->getResult(); if (res.contains(QStringLiteral("[ESIL] Stopped execution in an invalid instruction"))) { @@ -370,7 +370,7 @@ bool CutterCore::asyncCmd(const char *str, QSharedPointer &task) RVA offset = core->offset; task = QSharedPointer(new R2Task(str, true)); - connect(task.data(), &R2Task::finished, this, [this, offset, task] () { + connect(task.data(), &R2Task::finished, task.data(), [this, offset, task] () { CORE_LOCK(); if (offset != core->offset) {