Fixed Loader Install Cancel crash

Fixed a crash which occurred when the mod loader dialog was cancelled
after being reached from the no loader dialog

Signed-off-by: Pagwin <dev@pagwin.xyz>
This commit is contained in:
Pagwin
2025-11-22 17:10:22 -05:00
parent fca8ac40ff
commit 5e2c8bdcf7

View File

@@ -401,10 +401,10 @@ inline bool ModFolderPage::handleNoModLoader()
// Should be safe
auto profile = static_cast<MinecraftInstance*>(this->m_instance)->getPackProfile();
InstallLoaderDialog dialog(profile, QString(), this);
dialog.exec();
bool ret = dialog.exec();
this->m_container->refreshContainer();
// returning false so the caller can go and open up the dialog it was originally going to
return false;
return !ret;
}
case QMessageBox::No: {
// Nothing happens the dialog is already closing