Merge pull request #470 from kthchew/fix/ml-selector-crash
Fix crash if no Minecraft version is selected in the new instance screen
This commit is contained in:
commit
4e97f2a6fe
@ -118,7 +118,18 @@ void VanillaPage::filterChanged()
|
||||
|
||||
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())
|
||||
{
|
||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // empty list
|
||||
|
Loading…
Reference in New Issue
Block a user