S_FindMusicDef: Handle NULL/empty string explicitly
This commit is contained in:
parent
f6edce1f88
commit
16aa826eb4
1 changed files with 6 additions and 1 deletions
|
|
@ -1362,9 +1362,14 @@ int musicdef_volume;
|
|||
//
|
||||
musicdef_t *S_FindMusicDef(const char *name, UINT8 *i)
|
||||
{
|
||||
UINT32 hash = quickncasehash (name, 6);
|
||||
UINT32 hash;
|
||||
musicdef_t *def;
|
||||
|
||||
if (!name || !name[0])
|
||||
return NULL;
|
||||
|
||||
hash = quickncasehash (name, 6);
|
||||
|
||||
for (def = musicdefstart; def; def = def->next)
|
||||
{
|
||||
for (*i = 0; *i < def->numtracks; (*i)++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue