diff options
author | Matthew Hoops | 2009-08-23 21:15:47 +0000 |
---|---|---|
committer | Matthew Hoops | 2009-08-23 21:15:47 +0000 |
commit | e858994060118b0d21bbb18d3cfe59fb10f4399d (patch) | |
tree | 35368e58a2f500dcf79f79c5ebd04d32a9fa85b6 /engines/made/resource.cpp | |
parent | 080eaef76cb4051802a41c58155f7bb004ab9d1a (diff) | |
download | scummvm-rg350-e858994060118b0d21bbb18d3cfe59fb10f4399d.tar.gz scummvm-rg350-e858994060118b0d21bbb18d3cfe59fb10f4399d.tar.bz2 scummvm-rg350-e858994060118b0d21bbb18d3cfe59fb10f4399d.zip |
Fix bug #2843050 (RTZ: Crash to desktop with demo). Don't assert out when a resource slot can't be found.
svn-id: r43676
Diffstat (limited to 'engines/made/resource.cpp')
-rw-r--r-- | engines/made/resource.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index c7d15dae73..72aa006c68 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -525,7 +525,10 @@ bool ResourceReader::loadResource(ResourceSlot *slot, byte *&buffer, uint32 &siz ResourceSlot *ResourceReader::getResourceSlot(uint32 resType, uint index) { ResourceSlots *slots = _resSlots[resType]; - assert(slots); + + if (!slots) + return NULL; + if (index >= 1 && index < slots->size()) { return &(*slots)[index]; } else { |