Skip to content

Commit a389d52

Browse files
committed
Fix crash in CBassAudio when attempting to stream audio while disconnecting
Fixes #1065
1 parent 42dc40b commit a389d52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Client/mods/deathmatch/logic/CBassAudio.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ void CBassAudio::PlayStreamIntern(void* arguments)
365365
}
366366
else
367367
{
368-
// Deal with unwanted pSound
369-
g_pClientGame->GetManager()->GetSoundManager()->QueueChannelStop(pSound);
368+
// Deal with unwanted pSound unless we're disconnecting already
369+
if (g_pClientGame != nullptr && !g_pClientGame->IsBeingDeleted())
370+
g_pClientGame->GetManager()->GetSoundManager()->QueueChannelStop(pSound);
370371
}
371372
}
372373

0 commit comments

Comments
 (0)