Merge pull request #657 from JJL772/fix/misc-fixes

Fix crash when aborting instance import
This commit is contained in:
timoreo22 2022-05-28 15:38:36 +02:00 committed by GitHub
commit 83078cd49a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,7 @@ InstanceImportTask::InstanceImportTask(const QUrl sourceUrl, QWidget* parent)
bool InstanceImportTask::abort()
{
if (m_filesNetJob)
m_filesNetJob->abort();
m_extractFuture.cancel();
@ -394,7 +395,7 @@ void InstanceImportTask::processFlame()
{
auto results = m_modIdResolver->getResults();
m_filesNetJob = new NetJob(tr("Mod download"), APPLICATION->network());
for(auto result: results.files)
for(const auto& result: results.files)
{
QString filename = result.fileName;
if(!result.required)