[Scummvm-git-logs] scummvm master -> 0d3801cb861842082fca077609a4496ec1ce9947
elasota
noreply at scummvm.org
Tue Jul 5 03:32:11 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0d3801cb86 MTROPOLIS: Fix crash when a text label element has no font spec at all
Commit: 0d3801cb861842082fca077609a4496ec1ce9947
https://github.com/scummvm/scummvm/commit/0d3801cb861842082fca077609a4496ec1ce9947
Author: elasota (ejlasota at gmail.com)
Date: 2022-07-04T23:31:50-04:00
Commit Message:
MTROPOLIS: Fix crash when a text label element has no font spec at all
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index ad5d50e2811..55f8f353f4d 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -1794,6 +1794,10 @@ void TextLabelElement::render(Window *window) {
font = _runtime->getMacFontManager()->getFont(Graphics::MacFont(_macFontID, _size, slant, defaultUsage));
}
+ // Some weird cases (like the Immediate Action entryway in Obsidian) have no font info at all
+ if (!font)
+ font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
+
int height = font->getFontHeight();
int ascent = font->getFontAscent();
More information about the Scummvm-git-logs
mailing list