mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
proof all dialogs against use-after-free when closing main window while a dialog is open
This commit is contained in:
@ -94,6 +94,13 @@ WifiSettingsDialog::~WifiSettingsDialog()
|
||||
|
||||
void WifiSettingsDialog::done(int r)
|
||||
{
|
||||
if (!((MainWindow*)parent())->getEmuInstance())
|
||||
{
|
||||
QDialog::done(r);
|
||||
closeDlg();
|
||||
return;
|
||||
}
|
||||
|
||||
needsReset = false;
|
||||
|
||||
if (r == QDialog::Accepted)
|
||||
|
Reference in New Issue
Block a user