mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix starttrack crashing when a "null music" is selected.
Introduced with the refactoring in r3490. git-svn-id: https://svn.eduke32.com/eduke32@3542 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0646e41fa4
commit
2d01a81435
1 changed files with 3 additions and 2 deletions
|
@ -1003,10 +1003,11 @@ int32_t G_StartTrack(int32_t level)
|
|||
{
|
||||
int32_t musicIndex = MAXLEVELS*ud.volume_number + level;
|
||||
|
||||
if (MapInfo[g_musicIndex].musicfn != NULL)
|
||||
if (MapInfo[musicIndex].musicfn != NULL)
|
||||
{
|
||||
// Only set g_musicIndex on success.
|
||||
g_musicIndex = musicIndex;
|
||||
S_PlayMusic(MapInfo[g_musicIndex].musicfn, g_musicIndex);
|
||||
S_PlayMusic(MapInfo[musicIndex].musicfn, g_musicIndex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue