diff options
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r-- | engines/titanic/true_talk/tt_parser.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_vocab.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index f69c0c7c8f..1045416397 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -499,8 +499,10 @@ int TTparser::findFrames(TTsentence *sentence) { for (TTword *currP = word; currP && status <= 1; currP = currP->_nextP) status = processRequests(currP); - word->deleteSiblings(); - delete word; + if (word) { + word->deleteSiblings(); + delete word; + } } if (!status) { diff --git a/engines/titanic/true_talk/tt_vocab.cpp b/engines/titanic/true_talk/tt_vocab.cpp index 785f33a470..6748d6535b 100644 --- a/engines/titanic/true_talk/tt_vocab.cpp +++ b/engines/titanic/true_talk/tt_vocab.cpp @@ -552,7 +552,6 @@ TTword *TTvocab::getPrefixedWord(TTstring &str) const { word->_text = str;
}
- delete tempStr;
return word;
}
|