Fix abort?

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2023-03-04 11:07:07 +00:00
parent f583e617ec
commit 87384182a1
2 changed files with 8 additions and 3 deletions

View File

@ -54,8 +54,12 @@ void ModrinthPackExportTask::executeTask()
}
bool ModrinthPackExportTask::abort() {
if (!task.isNull())
return task->abort();
if (!task.isNull() && task->abort()) {
task = nullptr;
emitFailed(tr("Aborted"));
return true;
}
return false;
}