Merge pull request #607 from flowln/dont_crash_on_zip_import

Fixes https://github.com/PrismLauncher/PrismLauncher/issues/609
This commit is contained in:
flow 2022-12-16 07:22:22 -08:00 committed by Sefa Eyeoglu
parent 94410352f5
commit 040774d67b
No known key found for this signature in database
GPG key ID: C10411294912A422
3 changed files with 47 additions and 25 deletions

View file

@ -361,7 +361,9 @@ bool FlameCreationTask::createInstance()
FS::deletePath(jarmodsPath);
}
instance.setManagedPack("flame", m_managed_id, m_pack.name, m_managed_version_id, m_pack.version);
// Don't add managed info to packs without an ID (most likely imported from ZIP)
if (!m_managed_id.isEmpty())
instance.setManagedPack("flame", m_managed_id, m_pack.name, m_managed_version_id, m_pack.version);
instance.setName(name());
m_mod_id_resolver = new Flame::FileResolvingTask(APPLICATION->network(), m_pack);