- fixed crash when loading saved game that has no music

This commit is contained in:
alexey.lysiuk 2020-04-20 15:08:33 +03:00
parent c37dcc6eb4
commit 426f40dd52

View file

@ -118,15 +118,6 @@ public:
static FString LookupMusic(const char* musicname, int& order) static FString LookupMusic(const char* musicname, int& order)
{ {
if (strnicmp(musicname, ",CD,", 4) == 0)
{
static bool warned = false;
if (!warned)
Printf(TEXTCOLOR_RED "CD Audio no longer supported\n");
warned = true;
return "";
}
// allow specifying "*" as a placeholder to play the level's default music. // allow specifying "*" as a placeholder to play the level's default music.
if (musicname != nullptr && !strcmp(musicname, "*")) if (musicname != nullptr && !strcmp(musicname, "*"))
{ {
@ -146,6 +137,16 @@ static FString LookupMusic(const char* musicname, int& order)
// got nothing, return nothing. // got nothing, return nothing.
return ""; return "";
} }
if (strnicmp(musicname, ",CD,", 4) == 0)
{
static bool warned = false;
if (!warned)
Printf(TEXTCOLOR_RED "CD Audio no longer supported\n");
warned = true;
return "";
}
if (*musicname == '/') musicname++; if (*musicname == '/') musicname++;
FString DEH_Music; FString DEH_Music;