diff options
-rw-r--r-- | engines/sherlock/talk.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index b347bd458d..83596e4e85 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -339,7 +339,8 @@ void Talk::talkTo(const Common::String &filename) { _scriptSelect = select; _speaker = _talkTo; - Statement &statement = _statements[select]; + // Make a copy of the statement (in case the script frees the statement list), and then execute it + Statement statement = _statements[select]; doScript(_statements[select]._reply); if (IS_ROSE_TATTOO) { |