From 5c0562ca7a7f5141c996dfa3117b04ce681534a7 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 ed7f27172..3f9669e16 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)