diff options
author | Colin Snover | 2017-09-30 11:20:53 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-30 11:35:08 -0500 |
commit | f46fa18006755f7ec8e351f095b7b21a497aa6a4 (patch) | |
tree | d69c9307c5f5683d6f18453d4deb06d41393e9fc | |
parent | 4938d5cc76b0ba1037be1b9b589dd2093c62509f (diff) | |
download | scummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.tar.gz scummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.tar.bz2 scummvm-rg350-f46fa18006755f7ec8e351f095b7b21a497aa6a4.zip |
SCI32: Stop trying to clean up uninitialized VMDs
Fixes Trac#10252.
-rw-r--r-- | engines/sci/graphics/video32.cpp | 34 |
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; |