diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 591da5a1226..c695eb2cb3e 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -118,9 +118,9 @@ VcsCommandDecorator::VcsCommandDecorator(ShellCommand *command) connect(m_command, &ShellCommand::executedAsync, this, &VcsCommandDecorator::addTask); const auto connection = connect(m_command, &ShellCommand::runCommandFinished, this, &VcsCommandDecorator::postRunCommand); - connect(ICore::instance(), &ICore::coreAboutToClose, this, [connection] { + connect(ICore::instance(), &ICore::coreAboutToClose, this, [this, connection] { disconnect(connection); - abort(); + m_command->abort(); });} void VcsCommandDecorator::addTask(const QFuture &future)