mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 21:55:27 +00:00
better check for null font
This commit is contained in:
parent
d295ce01ea
commit
108efa4d20
@ -357,6 +357,9 @@ void Actor::sayLine(const char *msg, const char *msgId) {
|
||||
_sayLineText = NULL;
|
||||
}
|
||||
|
||||
if (!sayLineDefaults.font)
|
||||
return;
|
||||
|
||||
_sayLineText = new TextObject(false);
|
||||
_sayLineText->setDefaults(&sayLineDefaults);
|
||||
_sayLineText->setText((char *)msg);
|
||||
@ -373,10 +376,8 @@ void Actor::sayLine(const char *msg, const char *msgId) {
|
||||
_sayLineText->setY(_winY1);
|
||||
}
|
||||
}
|
||||
if (_sayLineText->isFontSet()) {
|
||||
_sayLineText->createBitmap();
|
||||
g_engine->registerTextObject(_sayLineText);
|
||||
}
|
||||
_sayLineText->createBitmap();
|
||||
g_engine->registerTextObject(_sayLineText);
|
||||
}
|
||||
|
||||
bool Actor::talking() {
|
||||
|
@ -70,9 +70,6 @@ public:
|
||||
void setHeight(int height) { _height = height; }
|
||||
void setFGColor(Color *fgColor) { _fgColor = fgColor; }
|
||||
void setFont(Font *font) { _font = font; }
|
||||
bool isFontSet() {
|
||||
return _font != NULL;
|
||||
}
|
||||
void setJustify(int justify) { _justify = justify; }
|
||||
void setDisabled(bool disabled) { _disabled = disabled; }
|
||||
int getBitmapWidth();
|
||||
|
Loading…
x
Reference in New Issue
Block a user