diff options
author | Colin Snover | 2017-01-08 22:52:19 -0600 |
---|---|---|
committer | Colin Snover | 2017-01-09 19:34:54 -0600 |
commit | c8b05f03ad31176ce8b6429c5d069f6800f29001 (patch) | |
tree | 15690101838682036c3e94ef001c05f951c609eb /engines | |
parent | b818e54027bf7730893e4199e02684e2a02cfb99 (diff) | |
download | scummvm-rg350-c8b05f03ad31176ce8b6429c5d069f6800f29001.tar.gz scummvm-rg350-c8b05f03ad31176ce8b6429c5d069f6800f29001.tar.bz2 scummvm-rg350-c8b05f03ad31176ce8b6429c5d069f6800f29001.zip |
SCI32: Fix invalid bitmap deletion in AVIPlayer
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/video32.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index 4af1e76ed9..f4eb2c2da0 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -140,6 +140,7 @@ AVIPlayer::AVIPlayer(SegManager *segMan, EventManager *eventMan) : _scaleBuffer(nullptr), _plane(nullptr), _screenItem(nullptr), + _bitmap(NULL_REG), _status(kAVINotOpen) {} AVIPlayer::~AVIPlayer() { @@ -327,8 +328,10 @@ AVIPlayer::IOStatus AVIPlayer::close() { _decoder->close(); _status = kAVINotOpen; - _segMan->freeBitmap(_bitmap); - _bitmap = NULL_REG; + if (_bitmap != NULL_REG) { + _segMan->freeBitmap(_bitmap); + _bitmap = NULL_REG; + } g_sci->_gfxFrameout->deletePlane(*_plane); _plane = nullptr; _screenItem = nullptr; |