Skip to content

Commit

Permalink
TITANIC: Fix crash if you exit the game whilst a bot is talking
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Sep 24, 2017
1 parent d9eebaf commit a6026fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/titanic/npcs/true_talk_npc.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit a6026fc

Please sign in to comment.