diff options
-rw-r--r-- | engines/sherlock/fonts.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp index 31c44dd4bf..57241bfa00 100644 --- a/engines/sherlock/fonts.cpp +++ b/engines/sherlock/fonts.cpp @@ -104,6 +104,9 @@ int Fonts::stringHeight(const Common::String &str) { } int Fonts::charWidth(unsigned char c) { + if (!_font) + return 0; + if (c == ' ') return 5; else if (Common::isPrint(c)) @@ -114,6 +117,10 @@ int Fonts::charWidth(unsigned char c) { int Fonts::charHeight(unsigned char c) { int idx = c - 33; + + if (!_font) + return 0; + if (c == ' ') idx = 0; else if (c == 225) |