aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-07-15 23:18:11 +0000
committerTorbjörn Andersson2006-07-15 23:18:11 +0000
commit961e56c6364eef6b405b4cfd97869a83740b5c7e (patch)
treef6b0021b8db4f83d89904e7e9d34b3833f2408b6 /engines/sword2
parentc7babbea99d100fe534bacf3f05a94c18be567e6 (diff)
downloadscummvm-rg350-961e56c6364eef6b405b4cfd97869a83740b5c7e.tar.gz
scummvm-rg350-961e56c6364eef6b405b4cfd97869a83740b5c7e.tar.bz2
scummvm-rg350-961e56c6364eef6b405b4cfd97869a83740b5c7e.zip
Fixed regression: Test if there's a text object to close before closing it.
svn-id: r23524
Diffstat (limited to 'engines/sword2')
-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