DIRECTOR: Sanity check for button drawing

This commit is contained in:
Eugene Sandulenko 2019-11-24 15:55:27 +01:00
parent 0bbfe624be
commit 98f614269f

View File

@ -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!