]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed a crash when using "-nosound"
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Jul 2004 13:28:58 +0000 (13:28 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Jul 2004 13:28:58 +0000 (13:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4261 d7cf8633-e32d-0410-b094-e92efae38249

snd_dma.c

index 01e48254e40049b73f734bdbec91995acb982c08..9dc6636554141c4dcd26e107e1030fde31582d1a 100644 (file)
--- a/snd_dma.c
+++ b/snd_dma.c
@@ -305,6 +305,9 @@ sfx_t *S_FindName (const char *name, qboolean stdpath)
 {
        sfx_t *sfx;
 
+       if (!snd_initialized.integer)
+               return NULL;
+
        sfx = S_GetCached (name, stdpath);
 
        // If we haven't allocated a sfx_t struct for it yet