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:
parent
430de6b270
commit
c387fb1819
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue