fix: crash when task was canceled and abort signal was fired early (#3712)

This commit is contained in:
Alexandru Ionut Tripon
2025-04-30 10:10:36 +03:00
committed by GitHub
4 changed files with 7 additions and 6 deletions

View File

@ -70,7 +70,6 @@ bool FlamePackExportTask::abort()
{
if (task) {
task->abort();
emitAborted();
return true;
}
return false;
@ -171,6 +170,7 @@ void FlamePackExportTask::collectHashes()
progressStep->status = status;
stepProgress(*progressStep);
});
connect(hashingTask.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
hashingTask->start();
}
@ -246,6 +246,7 @@ void FlamePackExportTask::makeApiRequest()
getProjectsInfo();
});
connect(task.get(), &Task::failed, this, &FlamePackExportTask::getProjectsInfo);
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
task->start();
}
@ -324,6 +325,7 @@ void FlamePackExportTask::getProjectsInfo()
buildZip();
});
connect(projTask.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
task.reset(projTask);
task->start();
}