Add missing safety checks.

svn-id: r17877
This commit is contained in:
Travis Howell 2005-05-01 01:02:34 +00:00
parent 051977cd17
commit 2260447e8b
2 changed files with 12 additions and 6 deletions

View file

@ -2779,8 +2779,10 @@ void ScummEngine_v100he::decodeParseString(int m, int n) {
_string[m].loadDefault();
if (n) {
_actorToPrintStrFor = pop();
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
_string[0].color = a->_talkColor;
if (_actorToPrintStrFor != 0xFF) {
a = derefActorSafe(_actorToPrintStrFor, "decodeParseString");
_string[0].color = a->_talkColor;
}
}
break;
case 92: