mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
fix: crash when task was canceled and abort signal was fired early (#3712)
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user