GRIM: Don't set a TextObject's _disabled to true if the text is none. Fix #227

This commit is contained in:
Giulio Camuffo 2011-06-24 15:22:31 +02:00
parent 1f3ce4a319
commit e585759a32

View File

@ -162,8 +162,9 @@ void TextObject::setupText() {
msg.deleteLastChar();
pos = msg.size() - 1;
}
delete[] _lines;
if (msg.size() == 0) {
_disabled = true;
_lines = NULL;
return;
}
@ -305,7 +306,7 @@ int TextObject::getLineY(int line) {
}
void TextObject::draw() {
if (_disabled)
if (_disabled || !_lines)
return;
if (!_created) {