fix: fix crash when selecting resource/texture/shader packs

Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
leo78913 2023-06-06 15:14:50 -03:00
parent 3a068970f9
commit a807b231a7

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;
} }