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
3 changed files with 47 additions and 25 deletions

View File

@ -217,7 +217,9 @@ bool ModrinthCreationTask::createInstance()
instance.setIconKey("modrinth");
}
instance.setManagedPack("modrinth", m_managed_id, m_managed_name, m_managed_version_id, version());
// Don't add managed info to packs without an ID (most likely imported from ZIP)
if (!m_managed_id.isEmpty())
instance.setManagedPack("modrinth", m_managed_id, m_managed_name, m_managed_version_id, version());
instance.setName(name());
instance.saveNow();