engine: client: do not cause assertion when using voice chat when sound is disabled or failed to initialize

This commit is contained in:
Alibek Omarov
2025-08-13 19:32:33 +05:00
parent f12ef07c02
commit 6b4a16b337

View File

@@ -1054,6 +1054,8 @@ rawchan_t *S_FindRawChannel( int entnum, qboolean create )
size_t raw_samples = 0;
rawchan_t *ch;
if( !sndpool ) return NULL; // sound is not active
if( !entnum ) return NULL; // world is unused
// check for replacement sound, or find the best one to replace