mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
proof all dialogs against use-after-free when closing main window while a dialog is open
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user