Skip to content

Commit

Permalink
CGE: Add check in order to avoid the display of empty text-boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Nov 14, 2011
1 parent d2027b0 commit 1f405af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engines/cge/text.cpp
Expand Up @@ -135,6 +135,13 @@ char *Text::getText(int ref) {

void Text::say(const char *text, Sprite *spr) {
_vm->killText();

if (!text)
return;

if (*text == 0)
return;

_vm->_talk = new Talk(_vm, text, kTBRound);
if (!_vm->_talk)
return;
Expand Down Expand Up @@ -180,6 +187,9 @@ void CGEEngine::inf(const char *text) {
if (!text)
return;

if (*text == 0)
return;

killText();
_talk = new Talk(this, text, kTBRect);
if (!_talk)
Expand Down

0 comments on commit 1f405af

Please sign in to comment.