Merge pull request #1115 from leo78913/fix-resource-downloader-crash

This commit is contained in:
Sefa Eyeoglu 2023-06-07 08:47:19 +02:00 committed by GitHub
commit accf0cd40e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,6 +253,8 @@ QList<BasePage*> ResourcePackDownloadDialog::getPages()
if (APPLICATION->capabilities() & Application::SupportsFlame) if (APPLICATION->capabilities() & Application::SupportsFlame)
pages.append(FlameResourcePackPage::create(this, *m_instance)); pages.append(FlameResourcePackPage::create(this, *m_instance));
m_selectedPage = dynamic_cast<ResourcePackResourcePage*>(pages[0]);
return pages; return pages;
} }
@ -278,6 +280,8 @@ QList<BasePage*> TexturePackDownloadDialog::getPages()
if (APPLICATION->capabilities() & Application::SupportsFlame) if (APPLICATION->capabilities() & Application::SupportsFlame)
pages.append(FlameTexturePackPage::create(this, *m_instance)); pages.append(FlameTexturePackPage::create(this, *m_instance));
m_selectedPage = dynamic_cast<TexturePackResourcePage*>(pages[0]);
return pages; return pages;
} }
@ -301,6 +305,8 @@ QList<BasePage*> ShaderPackDownloadDialog::getPages()
pages.append(ModrinthShaderPackPage::create(this, *m_instance)); pages.append(ModrinthShaderPackPage::create(this, *m_instance));
m_selectedPage = dynamic_cast<ShaderPackResourcePage*>(pages[0]);
return pages; return pages;
} }