diff --git a/src/g_game.c b/src/g_game.c
index d9d7b7f1283e52c922e8c9c109ace08486955b30..c51f63cdc13699fa38306337bbdb269adff6cd79 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -4714,6 +4714,9 @@ char *G_BuildMapTitle(INT32 mapnum)
 	if (mapnum == 0)
 		return Z_StrDup("Random");
 
+	if (!mapheaderinfo[mapnum-1])
+		P_AllocMapHeader(mapnum-1);
+
 	if (strcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
 	{
 		size_t len = 1;