fix: prevent deletes by shared pointer accidental creation

This fixes the launcher crashing when opening the game :iea:

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-09-16 20:00:36 -03:00
parent 10493bd44a
commit c9eb584ac8
4 changed files with 6 additions and 6 deletions

View File

@ -99,7 +99,7 @@ void ModFolderLoadTask::executeTask()
// Remove orphan metadata to prevent issues
// See https://github.com/PolyMC/PolyMC/issues/996
if (m_clean_orphan) {
QMutableMapIterator<QString, Mod::Ptr> iter(m_result->mods);
QMutableMapIterator iter(m_result->mods);
while (iter.hasNext()) {
auto mod = iter.next().value();
if (mod->status() == ModStatus::NotInstalled) {