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
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -63,7 +63,6 @@ bool ModrinthPackExportTask::abort()
|
||||
{
|
||||
if (task) {
|
||||
task->abort();
|
||||
emitAborted();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -158,6 +157,7 @@ void ModrinthPackExportTask::makeApiRequest()
|
||||
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
||||
connect(task.get(), &Task::succeeded, [this, response]() { parseApiResponse(response); });
|
||||
connect(task.get(), &Task::failed, this, &ModrinthPackExportTask::emitFailed);
|
||||
connect(task.get(), &Task::aborted, this, &ModrinthPackExportTask::emitAborted);
|
||||
task->start();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user