From 1b1a85a28375cf9c04c843121fb6f10a46c75440 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 7 Jun 2019 11:49:01 +0300 Subject: [PATCH] - check for presence of fonts in message box menu https://forum.zdoom.org/viewtopic.php?t=64958 --- wadsrc/static/zscript/ui/menu/messagebox.zs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/ui/menu/messagebox.zs b/wadsrc/static/zscript/ui/menu/messagebox.zs index ed7f271723..3f9669e162 100644 --- a/wadsrc/static/zscript/ui/menu/messagebox.zs +++ b/wadsrc/static/zscript/ui/menu/messagebox.zs @@ -65,8 +65,8 @@ class MessageBoxMenu : Menu if (!generic_ui) { - if (SmallFont.CanPrint(message) && SmallFont.CanPrint("$TXT_YES") && SmallFont.CanPrint("$TXT_NO")) textFont = SmallFont; - else if (OriginalSmallFont.CanPrint(message) && OriginalSmallFont.CanPrint("$TXT_YES") && OriginalSmallFont.CanPrint("$TXT_NO")) textFont = OriginalSmallFont; + if (SmallFont && SmallFont.CanPrint(message) && SmallFont.CanPrint("$TXT_YES") && SmallFont.CanPrint("$TXT_NO")) textFont = SmallFont; + else if (OriginalSmallFont && OriginalSmallFont.CanPrint(message) && OriginalSmallFont.CanPrint("$TXT_YES") && OriginalSmallFont.CanPrint("$TXT_NO")) textFont = OriginalSmallFont; } if (!textFont)