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

dreammaster dreammaster at scummvm.org
Sun Sep 24 18:39:57 CEST 2017


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:
a6026fc1fc TITANIC: Fix crash if you exit the game whilst a bot is talking


Commit: a6026fc1fce636b9b8493e8f76b39cbd8406c8dc
    https://github.com/scummvm/scummvm/commit/a6026fc1fce636b9b8493e8f76b39cbd8406c8dc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-24T12:39:39-04:00

Commit Message:
TITANIC: Fix crash if you exit the game whilst a bot is talking

Changed paths:
    engines/titanic/npcs/true_talk_npc.cpp


diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index d67fd36..6393f26 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -130,6 +130,10 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
 
 bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
 	debugC(DEBUG_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
+
+	if (!getGameManager())
+		return false;
+
 	_npcFlags &= ~NPCFLAG_SPEAKING;
 	--_speechCounter;
 	_speechDuration = 0;





More information about the Scummvm-git-logs mailing list