Merge pull request #657 from JJL772/fix/misc-fixes
Fix crash when aborting instance import
This commit is contained in:
commit
83078cd49a
@ -72,7 +72,8 @@ InstanceImportTask::InstanceImportTask(const QUrl sourceUrl, QWidget* parent)
|
|||||||
|
|
||||||
bool InstanceImportTask::abort()
|
bool InstanceImportTask::abort()
|
||||||
{
|
{
|
||||||
m_filesNetJob->abort();
|
if (m_filesNetJob)
|
||||||
|
m_filesNetJob->abort();
|
||||||
m_extractFuture.cancel();
|
m_extractFuture.cancel();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -394,7 +395,7 @@ void InstanceImportTask::processFlame()
|
|||||||
{
|
{
|
||||||
auto results = m_modIdResolver->getResults();
|
auto results = m_modIdResolver->getResults();
|
||||||
m_filesNetJob = new NetJob(tr("Mod download"), APPLICATION->network());
|
m_filesNetJob = new NetJob(tr("Mod download"), APPLICATION->network());
|
||||||
for(auto result: results.files)
|
for(const auto& result: results.files)
|
||||||
{
|
{
|
||||||
QString filename = result.fileName;
|
QString filename = result.fileName;
|
||||||
if(!result.required)
|
if(!result.required)
|
||||||
|
Loading…
Reference in New Issue
Block a user