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:
@ -163,6 +163,12 @@ void CameraSettingsDialog::on_CameraSettingsDialog_accepted()
|
||||
|
||||
void CameraSettingsDialog::on_CameraSettingsDialog_rejected()
|
||||
{
|
||||
if (!((MainWindow*)parent())->getEmuInstance())
|
||||
{
|
||||
closeDlg();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
camManager[i]->stop();
|
||||
|
Reference in New Issue
Block a user