diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index 6ea3930e586..1054b0844f2 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!