aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword2/animation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 20ac26774e..44eb8dd813 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -401,7 +401,9 @@ void MoviePlayer::play(int32 leadIn, int32 leadOut) {
}
// The current text object may still be open
- closeTextObject(_textList[_currentText]);
+ if (_textList && _textList[_currentText]) {
+ closeTextObject(_textList[_currentText]);
+ }
if (!terminate) {
// Wait for the voice to stop playing. This is to make sure