mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
- added safeguards against very early access to console variables in Cocoa backend
for an unknown reason, application activation functions can be called way too early during app launch `S_SetSoundPaused()` function tries to read values of `i_pauseinbackground` and `i_soundinbackground` console variables before their initialization leading to a null pointer dereference https://forum.zdoom.org/viewtopic.php?t=78092
This commit is contained in:
parent
22271d146a
commit
ae2fa11963
1 changed files with 4 additions and 2 deletions
|
@ -282,7 +282,8 @@ extern bool AppActive;
|
|||
{
|
||||
ZD_UNUSED(aNotification);
|
||||
|
||||
S_SetSoundPaused(1);
|
||||
if (GSnd)
|
||||
S_SetSoundPaused(1);
|
||||
|
||||
AppActive = true;
|
||||
}
|
||||
|
@ -291,7 +292,8 @@ extern bool AppActive;
|
|||
{
|
||||
ZD_UNUSED(aNotification);
|
||||
|
||||
S_SetSoundPaused(0);
|
||||
if (GSnd)
|
||||
S_SetSoundPaused(0);
|
||||
|
||||
AppActive = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue