mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
fix the crash on focus loss when using in_snd_block and -nosound
This commit is contained in:
parent
6a96697080
commit
4a1db5a998
1 changed files with 2 additions and 2 deletions
|
@ -349,14 +349,14 @@ SNDDMA_Submit (void)
|
|||
static void
|
||||
SNDDMA_BlockSound (void)
|
||||
{
|
||||
if (++snd_blocked == 1)
|
||||
if (snd_inited && ++snd_blocked == 1)
|
||||
qfsnd_pcm_pause (pcm, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
SNDDMA_UnblockSound (void)
|
||||
{
|
||||
if (!snd_blocked)
|
||||
if (!snd_inited || !snd_blocked)
|
||||
return;
|
||||
if (!--snd_blocked)
|
||||
qfsnd_pcm_pause (pcm, 0);
|
||||
|
|
Loading…
Reference in a new issue