mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +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,6 +282,7 @@ extern bool AppActive;
|
||||||
{
|
{
|
||||||
ZD_UNUSED(aNotification);
|
ZD_UNUSED(aNotification);
|
||||||
|
|
||||||
|
if (GSnd)
|
||||||
S_SetSoundPaused(1);
|
S_SetSoundPaused(1);
|
||||||
|
|
||||||
AppActive = true;
|
AppActive = true;
|
||||||
|
@ -291,6 +292,7 @@ extern bool AppActive;
|
||||||
{
|
{
|
||||||
ZD_UNUSED(aNotification);
|
ZD_UNUSED(aNotification);
|
||||||
|
|
||||||
|
if (GSnd)
|
||||||
S_SetSoundPaused(0);
|
S_SetSoundPaused(0);
|
||||||
|
|
||||||
AppActive = false;
|
AppActive = false;
|
||||||
|
|
Loading…
Reference in a new issue