mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 18:05:46 +00:00
ui: fix crash when closing configure window
This crash happens 100% of the time (on Linux at least), you just need to open the configure window and click OK. It seems to happen when the tabs are destroyed and once all the tabs are destroyed, a final signal is sent with `index == -1`. So `debug_tab_tab` doesn't exist anymore when this happens, so the crash.
This commit is contained in:
parent
9bed9e8e4e
commit
aa1510877d
1 changed files with 5 additions and 2 deletions
|
@ -81,8 +81,11 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
||||||
SetConfiguration();
|
SetConfiguration();
|
||||||
PopulateSelectionList();
|
PopulateSelectionList();
|
||||||
|
|
||||||
connect(ui->tabWidget, &QTabWidget::currentChanged, this,
|
connect(ui->tabWidget, &QTabWidget::currentChanged, this, [this](int index) {
|
||||||
[this]() { debug_tab_tab->SetCurrentIndex(0); });
|
if (index != -1) {
|
||||||
|
debug_tab_tab->SetCurrentIndex(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
connect(ui_tab.get(), &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
|
connect(ui_tab.get(), &ConfigureUi::LanguageChanged, this, &ConfigureDialog::OnLanguageChanged);
|
||||||
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
|
connect(ui->selectorList, &QListWidget::itemSelectionChanged, this,
|
||||||
&ConfigureDialog::UpdateVisibleTabs);
|
&ConfigureDialog::UpdateVisibleTabs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue