Fix crash if no Minecraft version is selected in the new instance screen
This commit is contained in:
parent
27e803e4a4
commit
0682fe544a
@ -118,7 +118,18 @@ void VanillaPage::filterChanged()
|
|||||||
|
|
||||||
void VanillaPage::loaderFilterChanged()
|
void VanillaPage::loaderFilterChanged()
|
||||||
{
|
{
|
||||||
auto minecraftVersion = m_selectedVersion->descriptor();
|
QString minecraftVersion;
|
||||||
|
if (m_selectedVersion)
|
||||||
|
{
|
||||||
|
minecraftVersion = m_selectedVersion->descriptor();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // empty list
|
||||||
|
ui->loaderVersionList->setEmptyString(tr("No Minecraft version is selected."));
|
||||||
|
ui->loaderVersionList->setEmptyMode(VersionListView::String);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(ui->noneFilter->isChecked())
|
if(ui->noneFilter->isChecked())
|
||||||
{
|
{
|
||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // empty list
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // empty list
|
||||||
|
Loading…
Reference in New Issue
Block a user