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