diff options
author | Willem Jan Palenstijn | 2011-11-18 23:23:10 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-18 23:24:41 +0100 |
commit | 65dec085b3445a9d5c447b31d39b536af0ae307b (patch) | |
tree | 591abc2f9fc2a73042c5c8c81869fca5c44e8365 /engines | |
parent | e59e2e4b198f7a716ab77cc68fc298c7aa9aff71 (diff) | |
download | scummvm-rg350-65dec085b3445a9d5c447b31d39b536af0ae307b.tar.gz scummvm-rg350-65dec085b3445a9d5c447b31d39b536af0ae307b.tar.bz2 scummvm-rg350-65dec085b3445a9d5c447b31d39b536af0ae307b.zip |
DREAMWEB: Remove assert when assigning an invalid segmentRef
This is a valid operation when it is performed by a push/pop pair
to save/restore an invalidated segment register, which happens when you die.
Actually dereferencing this invalid segmentRef will still trigger
other existing asserts.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/runtime.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h index 8aa71b285c..72b11c6df5 100644 --- a/engines/dreamweb/runtime.h +++ b/engines/dreamweb/runtime.h @@ -261,8 +261,10 @@ public: SegmentRef getSegment(uint16 value) { SegmentMap::iterator i = _segments.find(value); - assert(i != _segments.end()); - return SegmentRef(this, value, i->_value); + if (i != _segments.end()) + return SegmentRef(this, value, i->_value); + else + return SegmentRef(this, value); } SegmentRef allocateSegment(uint size) { |