- don't crash on null pointers in V_GetFont.

This commit is contained in:
Christoph Oelckers 2022-10-20 18:18:22 +02:00
parent 4686d10f41
commit 1855edba37
1 changed files with 1 additions and 0 deletions

View File

@ -92,6 +92,7 @@ TArray<PalEntry> TranslationColors;
FFont *V_GetFont(const char *name, const char *fontlumpname)
{
if (name != nullptr) return nullptr;
if (!stricmp(name, "DBIGFONT")) name = "BigFont";
else if (!stricmp(name, "CONFONT")) name = "ConsoleFont"; // several mods have used the name CONFONT directly and effectively duplicated the font.
else if (!stricmp(name, "INDEXFON")) name = "IndexFont"; // Same here - for whatever reason some people had to use its 8 character name...