From 6f71fd5b21f603b2bde8e4524cebbf3d989c283f Mon Sep 17 00:00:00 2001 From: staphen Date: Sun, 9 May 2021 20:37:18 -0400 Subject: [PATCH] Use OS GUI to display error if font fails to load. --- Source/DiabloUI/dialogs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/DiabloUI/dialogs.cpp b/Source/DiabloUI/dialogs.cpp index 88a77012f..c84f0c830 100644 --- a/Source/DiabloUI/dialogs.cpp +++ b/Source/DiabloUI/dialogs.cpp @@ -280,7 +280,10 @@ void UiOkDialog(const char *text, const char *caption, bool error, const std::ve inDialog = true; Init(text, caption, error, !renderBehind.empty()); - DialogLoop(vecOkDialog, renderBehind); + if (font != nullptr) + DialogLoop(vecOkDialog, renderBehind); + else + UiOkDialog(text, caption, error, renderBehind); Deinit(); inDialog = false; }