Merge pull request #1333 from Ryex/fix/null_instance_edit_crash
This commit is contained in:
commit
06a7d447f6
@ -1280,7 +1280,17 @@ void MainWindow::globalSettingsClosed()
|
||||
|
||||
void MainWindow::on_actionEditInstance_triggered()
|
||||
{
|
||||
APPLICATION->showInstanceWindow(m_selectedInstance);
|
||||
|
||||
if (!m_selectedInstance)
|
||||
return;
|
||||
|
||||
if (m_selectedInstance->canEdit()) {
|
||||
APPLICATION->showInstanceWindow(m_selectedInstance);
|
||||
} else {
|
||||
CustomMessageBox::selectable(this, tr("Instance not editable"),
|
||||
tr("This instance is not editable. It may be broken, invalid, or too old. Check logs for details."),
|
||||
QMessageBox::Critical)->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionManageAccounts_triggered()
|
||||
|
Loading…
Reference in New Issue
Block a user