mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
DIRECTOR: Added sanity check when drawing text
This commit is contained in:
parent
4cdb198f78
commit
c03ee226ae
@ -915,6 +915,11 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
|
||||
// textCast->fontId = _vm->_wm->_fontMan->getFontIdByName(_vm->getCurrentScore()->_fontMap[textCast->fontId]);
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0) {
|
||||
warning("renderText: Requested to draw on an empty surface: %d x %d", width, height);
|
||||
return;
|
||||
}
|
||||
|
||||
Graphics::MacFont macFont = Graphics::MacFont(textCast->fontId, textCast->fontSize, textCast->textSlant);
|
||||
|
||||
const Graphics::Font *font = _vm->_wm->_fontMan->getFont(macFont);
|
||||
|
Loading…
Reference in New Issue
Block a user