umapinfo: map entries without a 'levelname' field fall back to the default map title (#226)

This commit is contained in:
Roman Fomin 2021-06-22 13:36:18 +07:00 committed by GitHub
parent a02a6a5576
commit 51d30140f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -530,7 +530,7 @@ void HU_Start(void)
hu_msgbg, &message_list_on); // killough 11/98 hu_msgbg, &message_list_on); // killough 11/98
// initialize the automap's level title widget // initialize the automap's level title widget
if (gamemapinfo) if (gamemapinfo && gamemapinfo->levelname)
{ {
if (gamemapinfo->label) if (gamemapinfo->label)
s = gamemapinfo->label; s = gamemapinfo->label;
@ -546,7 +546,6 @@ void HU_Start(void)
HUlib_addCharToTextLine(&w_title, ' '); HUlib_addCharToTextLine(&w_title, ' ');
} }
s = gamemapinfo->levelname; s = gamemapinfo->levelname;
if (!s) s = "Unnamed";
} }
else else
// [FG] fix crash when gamemap is not initialized // [FG] fix crash when gamemap is not initialized