From 3116a7053a923a46e795468d6cbb605f74b3aeac Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sun, 19 Jan 2025 23:19:56 -0800 Subject: [PATCH] fix crash on Export > Stop Capture regression in 272f880e --- src/jobs/abstractjob.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jobs/abstractjob.cpp b/src/jobs/abstractjob.cpp index 14061cf13a..32bdfc479c 100644 --- a/src/jobs/abstractjob.cpp +++ b/src/jobs/abstractjob.cpp @@ -54,6 +54,10 @@ AbstractJob::AbstractJob(const QString &name, QThread::Priority priority) connect(m_actionPause, &QAction::triggered, this, &AbstractJob::pause); connect(m_actionResume, &QAction::triggered, this, &AbstractJob::resume); + connect(this, &AbstractJob::finished, this, [this]() { + m_actionPause->setEnabled(false); + m_actionResume->setEnabled(false); + }); } void AbstractJob::start() @@ -209,8 +213,6 @@ void AbstractJob::onFinished(int exitCode, QProcess::ExitStatus exitStatus) m_log.append(QStringLiteral("Failed with exit code %1\n").arg(exitCode)); emit finished(this, false); } - m_actionPause->setEnabled(false); - m_actionResume->setEnabled(false); m_isPaused = false; }