mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -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;
|
break;
|
||||||
|
|
||||||
case 2: // only currently focused instance
|
case 2: // only currently focused instance
|
||||||
if (!mainWindow->isActiveWindow()) audioMuted = true;
|
if (mainWindow != nullptr)
|
||||||
|
audioMuted = !mainWindow->isActiveWindow();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user