Merge pull request #1352 from Trial97/crash_after_abort

Do not reset shared pointer if it's already empty
This commit is contained in:
Rachel Powers 2023-07-13 21:11:47 -07:00 committed by Sefa Eyeoglu
parent 2b3021b7c2
commit 79537f2948
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -145,7 +145,8 @@ void EnsureMetadataTask::executeTask()
connect(project_task.get(), &Task::finished, this, [=] {
invalidade_leftover();
project_task->deleteLater();
m_current_task = nullptr;
if (m_current_task)
m_current_task.reset();
});
m_current_task = project_task;
@ -154,7 +155,8 @@ void EnsureMetadataTask::executeTask()
connect(version_task.get(), &Task::finished, [=] {
version_task->deleteLater();
m_current_task = nullptr;
if (m_current_task)
m_current_task.reset();
});
if (m_mods.size() > 1)