Adding some sanity asserts

svn-id: r47749
This commit is contained in:
Sven Hesse 2010-01-31 13:05:46 +00:00
parent d6611ec7dc
commit 2185f6b164

View File

@ -555,6 +555,8 @@ TextItem *Resources::getTextItem(uint16 id) const {
if (id >= _totTextTable->itemsCount)
return 0;
assert(_totTextTable->items);
TOTTextItem &totItem = _totTextTable->items[id];
if ((totItem.offset == 0xFFFF) || (totItem.size == 0))
@ -614,6 +616,8 @@ Resource *Resources::getTOTResource(uint16 id) const {
return 0;
}
assert(_totResourceTable->items);
TOTResourceItem &totItem = _totResourceTable->items[id];
byte *data = 0;
@ -639,6 +643,8 @@ Resource *Resources::getEXTResource(uint16 id) const {
return 0;
}
assert(_totResourceTable->items);
EXTResourceItem &extItem = _extResourceTable->items[id];
uint32 size = extItem.size;