[Scummvm-git-logs] scummvm master -> a3873e7e4bb9022382b97ae9b916aa957f240bdb

dreammaster paulfgilbert at gmail.com
Sun Mar 3 20:24:55 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a3873e7e4b TITANIC: Fix crash asking Parrot who sabotaged the ship


Commit: a3873e7e4bb9022382b97ae9b916aa957f240bdb
    https://github.com/scummvm/scummvm/commit/a3873e7e4bb9022382b97ae9b916aa957f240bdb
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-03-03T11:24:39-08:00

Commit Message:
TITANIC: Fix crash asking Parrot who sabotaged the ship

Changed paths:
    NEWS
    engines/titanic/true_talk/tt_concept.cpp
    engines/titanic/true_talk/tt_parser.cpp


diff --git a/NEWS b/NEWS
index a58d2f2..396707f 100644
--- a/NEWS
+++ b/NEWS
@@ -64,6 +64,7 @@ For a more comprehensive changelog of the latest experimental code, see:
     - Fixed parser not getting properly reset across sentences in a conversation.
     - Fixed endless busy cursor on Titania closeup when brain slots are incorrectly inserted.
 	- Fixed loading saves in front of Barbot could cause him to go into an infinite animation loop.
+	- Fixed crash asking Parrot who sabotaged the ship
 
  Tucker:
    - Fixed multiple graphic issues in Bud Tucker in Double Trouble.
diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp
index a1bb1bc..990c8d2 100644
--- a/engines/titanic/true_talk/tt_concept.cpp
+++ b/engines/titanic/true_talk/tt_concept.cpp
@@ -301,10 +301,14 @@ TTconcept *TTconcept::findBy20(int val) {
 }
 
 bool TTconcept::isWordId(int id) const {
+	if (this == nullptr)
+		return false;
 	return _wordP && _wordP->_id == id;
 }
 
 int TTconcept::getWordId() const {
+	if (this == nullptr)
+		return 0;
 	return _wordP ? _wordP->_id : 0;
 }
 
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp
index e34b1b8..99f2c78 100644
--- a/engines/titanic/true_talk/tt_parser.cpp
+++ b/engines/titanic/true_talk/tt_parser.cpp
@@ -801,7 +801,7 @@ int TTparser::considerRequests(TTword *word) {
 			if (!_sentenceConcept->_concept0P) {
 				flag = filterConcepts(5, 0);
 			} else if (_sentenceConcept->_concept0P->compareTo("?") &&
-						_sentenceConcept->_concept1P->isWordId(113) &&
+						(_sentenceConcept->_concept1P && _sentenceConcept->_concept1P->isWordId(113)) &&
 						word->_wordClass == WC_THING) {
 				TTconcept *oldConcept = _sentenceConcept->_concept0P;
 				_sentenceConcept->_concept0P = nullptr;





More information about the Scummvm-git-logs mailing list