diff --git a/src/sound.c b/src/sound.c index 6c27f6b..02bb457 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,4 +1,4 @@ -/* $Id: sound.c,v 1.4 2003/08/10 13:33:32 stpohle Exp $ */ +/* $Id: sound.c,v 1.5 2003/08/11 18:25:19 stpohle Exp $ */ /* sound */ #include "sound.h" @@ -160,9 +160,11 @@ snd_load (char *tilesetname) } /* try loading the music from the tileset or the default */ - sprintf (fullname, "%s/music/%s", bman.datapath, desel->name); - if ((snd.music = Mix_LoadMUS (fullname)) == NULL) - d_printf ("Couldn't load %s: %s\n", fullname, SDL_GetError ()); + if (desel != NULL) { + sprintf (fullname, "%s/music/%s", bman.datapath, desel->name); + if ((snd.music = Mix_LoadMUS (fullname)) == NULL) + d_printf ("Couldn't load %s: %s\n", fullname, SDL_GetError ()); + } #endif return;