diff options
author | Colin Snover | 2017-07-18 12:33:33 -0500 |
---|---|---|
committer | Colin Snover | 2017-07-18 12:35:06 -0500 |
commit | 6ad230da7c4d1bfc6e46c5f12e845ae43fe9439b (patch) | |
tree | c7dd3db8b274ae170a904261f7a4886d3a9c4f6b | |
parent | 4fc6cef968fbf3dc12a6f60611689938dc76da8e (diff) | |
download | scummvm-rg350-6ad230da7c4d1bfc6e46c5f12e845ae43fe9439b.tar.gz scummvm-rg350-6ad230da7c4d1bfc6e46c5f12e845ae43fe9439b.tar.bz2 scummvm-rg350-6ad230da7c4d1bfc6e46c5f12e845ae43fe9439b.zip |
SCI32: Fix kIsOnMe crashes in LSL7 About screen
-rw-r--r-- | engines/sci/graphics/screen_item32.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp index 7b7553189a..cac643edf9 100644 --- a/engines/sci/graphics/screen_item32.cpp +++ b/engines/sci/graphics/screen_item32.cpp @@ -131,8 +131,11 @@ void ScreenItem::operator=(const ScreenItem &other) { // to clear `_celObj` here; instead, it unconditionally set `_celInfo`, // didn't clear `_celObj`, and did hacky stuff in `kIsOnMe` to avoid // testing a mismatched `_celObj`. See `GfxFrameout::kernelIsOnMe` for - // more detail. - if (_celInfo != other._celInfo) { + // more detail. kCelTypeMem types are unconditionally invalidated because + // the properties of a CelObjMem can "change" when a game deletes a bitmap + // and then creates a new one that reuses the old bitmap's offset in + // BitmapTable (as happens in the LSL7 About screen when hovering names). + if (_celInfo.type == kCelTypeMem || _celInfo != other._celInfo) { _celInfo = other._celInfo; delete _celObj; _celObj = nullptr; |