diff options
author | Eugene Sandulenko | 2019-11-24 15:55:27 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-24 15:57:08 +0100 |
commit | 98f614269fb757ac4b8e827ee89693aa4e096ab7 (patch) | |
tree | e2dd3fd4ac203f3b78542fb35ddaef4e3a0d776c | |
parent | 0bbfe624be0b7fb01a1e94f37e00b9a448651f7f (diff) | |
download | scummvm-rg350-98f614269fb757ac4b8e827ee89693aa4e096ab7.tar.gz scummvm-rg350-98f614269fb757ac4b8e827ee89693aa4e096ab7.tar.bz2 scummvm-rg350-98f614269fb757ac4b8e827ee89693aa4e096ab7.zip |
DIRECTOR: Sanity check for button drawing
-rw-r--r-- | engines/director/frame.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index 6ea3930e58..1054b0844f 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -792,6 +792,9 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo textCast->cachedMacText->setWm(_vm->_wm); // TODO this is not a good place to do it const Graphics::ManagedSurface *textSurface = textCast->cachedMacText->getSurface(); + if (!textSurface) + return; + height = textSurface->h; if (textSize != NULL) { // TODO: this offset could be due to incorrect fonts loaded! |