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:
@ -59,6 +59,13 @@ MPSettingsDialog::~MPSettingsDialog()
|
||||
|
||||
void MPSettingsDialog::done(int r)
|
||||
{
|
||||
if (!((MainWindow*)parent())->getEmuInstance())
|
||||
{
|
||||
QDialog::done(r);
|
||||
closeDlg();
|
||||
return;
|
||||
}
|
||||
|
||||
if (r == QDialog::Accepted)
|
||||
{
|
||||
auto& cfg = emuInstance->getGlobalConfig();
|
||||
|
Reference in New Issue
Block a user