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:
Nadia Holmquist Pedersen 2022-11-05 16:57:28 +01:00
parent 430de6b270
commit c387fb1819
1 changed files with 2 additions and 1 deletions

View File

@ -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;
} }
} }