[Scummvm-cvs-logs] scummvm master -> 65dec085b3445a9d5c447b31d39b536af0ae307b
wjp
wjp at usecode.org
Fri Nov 18 23:25:28 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
65dec085b3 DREAMWEB: Remove assert when assigning an invalid segmentRef
Commit: 65dec085b3445a9d5c447b31d39b536af0ae307b
https://github.com/scummvm/scummvm/commit/65dec085b3445a9d5c447b31d39b536af0ae307b
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-11-18T14:24:41-08:00
Commit Message:
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.
Changed paths:
engines/dreamweb/runtime.h
diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h
index 8aa71b2..72b11c6 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) {
More information about the Scummvm-git-logs
mailing list