From 8f480d9c2cf17fdee74c75207698dea9b66522c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Wed, 18 Dec 2019 14:56:57 +0100 Subject: [PATCH] Fix Segfault on Quit after Debug/Emulation (#1943) --- src/core/Cutter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {