proof all dialogs against use-after-free when closing main window while a dialog is open

This commit is contained in:
Arisotura
2024-10-27 14:24:59 +01:00
parent a61754bb58
commit f2dce621ce
11 changed files with 90 additions and 0 deletions

View File

@ -121,6 +121,12 @@ void VideoSettingsDialog::on_VideoSettingsDialog_accepted()
void VideoSettingsDialog::on_VideoSettingsDialog_rejected()
{
if (!((MainWindow*)parent())->getEmuInstance())
{
closeDlg();
return;
}
bool old_gl = UsesGL();
auto& cfg = emuInstance->getGlobalConfig();