Add checks to ensure that the text received is valid.
This commit is contained in:
parent
1c2652424f
commit
f925f95fa9
2 changed files with 7 additions and 2 deletions
|
@ -168,7 +168,8 @@ void L1_BlastText() {
|
|||
}
|
||||
|
||||
const char *line = lua_getstring(textObj);
|
||||
Common::String text = line;
|
||||
if (!line || line[0] == 0)
|
||||
return;
|
||||
|
||||
TextObject *textObject = new TextObject(true);
|
||||
textObject->setDefaults(&g_grim->_blastTextDefaults);
|
||||
|
@ -176,7 +177,7 @@ void L1_BlastText() {
|
|||
if (lua_istable(tableObj))
|
||||
setTextObjectParams(textObject, tableObj);
|
||||
|
||||
textObject->setText(text.c_str());
|
||||
textObject->setText(line);
|
||||
textObject->draw();
|
||||
delete textObject;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue