mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
mainWindow may be nullptr when audioMute() is called.
Fixes potential crash on launch when multiplayer audio output is set to only the current window.
This commit is contained in:
@ -186,7 +186,8 @@ void audioMute()
|
||||
break;
|
||||
|
||||
case 2: // only currently focused instance
|
||||
if (!mainWindow->isActiveWindow()) audioMuted = true;
|
||||
if (mainWindow != nullptr)
|
||||
audioMuted = !mainWindow->isActiveWindow();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user