diff options
Diffstat (limited to 'engines/titanic/true_talk/tt_concept.cpp')
-rw-r--r-- | engines/titanic/true_talk/tt_concept.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp index 9aad88722b..acb2e61e9e 100644 --- a/engines/titanic/true_talk/tt_concept.cpp +++ b/engines/titanic/true_talk/tt_concept.cpp @@ -131,7 +131,7 @@ void TTconcept::setScriptType(ScriptType scriptType) { int TTconcept::initializeWordRef(TTword *word) { delete _wordP; - _wordP = word; + _wordP = word->copy(); return 0; } @@ -213,11 +213,9 @@ void TTconcept::copyFrom(TTconcept *src) { } int TTconcept::setOwner(TTconcept *src) { - if (this) { - if (src->_wordP) { - TTword *newWord = src->_wordP->copy(); - return setOwner(newWord, 1); - } + if (src->_wordP) { + TTword *newWord = src->_wordP->copy(); + return setOwner(newWord, 1); } return 0; @@ -298,11 +296,11 @@ TTconcept *TTconcept::findBy20(int val) { } bool TTconcept::isWordId(int id) const { - return this && _wordP && _wordP->_id == id; + return _wordP && _wordP->_id == id; } int TTconcept::getWordId() const { - return this && _wordP ? _wordP->_id : 0; + return _wordP ? _wordP->_id : 0; } } // End of namespace Titanic |