aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorColin Snover2017-09-30 11:20:53 -0500
committerColin Snover2017-09-30 11:35:08 -0500
commitf46fa18006755f7ec8e351f095b7b21a497aa6a4 (patch)
treed69c9307c5f5683d6f18453d4deb06d41393e9fc /engines/sci/graphics
parent4938d5cc76b0ba1037be1b9b589dd2093c62509f (diff)
downloadscummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.tar.gz
scummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.tar.bz2
scummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.zip
SCI32: Stop trying to clean up uninitialized VMDs
Fixes Trac#10252.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/video32.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 736ee15428..e837cecb49 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -599,20 +599,26 @@ VMDPlayer::IOStatus VMDPlayer::close() {
return kIOSuccess;
}
- if (_isComposited) {
- closeComposited();
- } else {
- closeOverlay();
- }
+ if (_isInitialized) {
+ if (_isComposited) {
+ closeComposited();
+ } else {
+ closeOverlay();
+ }
- if (_blackoutPlane != nullptr) {
- g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
- _blackoutPlane = nullptr;
- }
+ if (_blackoutPlane != nullptr) {
+ g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
+ _blackoutPlane = nullptr;
+ }
- if (!_leaveLastFrame && !_leaveScreenBlack) {
- // This call *actually* deletes the blackout plane
- g_sci->_gfxFrameout->frameOut(true);
+ if (!_leaveLastFrame && !_leaveScreenBlack) {
+ // This call *actually* deletes the blackout plane
+ g_sci->_gfxFrameout->frameOut(true);
+ }
+
+ if (!_showCursor) {
+ g_sci->_gfxCursor32->unhide();
+ }
}
_decoder->close();
@@ -622,10 +628,6 @@ VMDPlayer::IOStatus VMDPlayer::close() {
_bundledVmd = nullptr;
}
- if (!_showCursor) {
- g_sci->_gfxCursor32->unhide();
- }
-
_isOpen = false;
_isInitialized = false;
_ignorePalettes = false;