Fix(Task): check if task is still running before calling emitAborted()

Signed-off-by: 0x189D7997 <199489335+0x189D7997@users.noreply.github.com>
This commit is contained in:
0x189D7997 2026-04-17 02:11:06 +00:00 committed by GitHub
parent 4ed3aa1f1c
commit 15b39af92e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,7 +165,7 @@ class Task : public QObject, public QRunnable {
//! used by external code to ask the task to abort //! used by external code to ask the task to abort
virtual bool abort() virtual bool abort()
{ {
if (canAbort()) if (canAbort() && isRunning())
emitAborted(); emitAborted();
return canAbort(); return canAbort();
} }