diff options
| author | Matthew Hoops | 2013-04-15 18:32:00 -0400 | 
|---|---|---|
| committer | Matthew Hoops | 2013-04-15 18:32:00 -0400 | 
| commit | 749cdd6f44b4e26f7e46f72ae9b728cce81b4f6a (patch) | |
| tree | ef6f2e95497d79692aa51ee790d963dd7c176d2b | |
| parent | 582e464360fb2f038f4433c439d2947f74cb58d7 (diff) | |
| download | scummvm-rg350-749cdd6f44b4e26f7e46f72ae9b728cce81b4f6a.tar.gz scummvm-rg350-749cdd6f44b4e26f7e46f72ae9b728cce81b4f6a.tar.bz2 scummvm-rg350-749cdd6f44b4e26f7e46f72ae9b728cce81b4f6a.zip | |
PEGASUS: Add sanity check on the NItm resource being present
| -rw-r--r-- | engines/pegasus/pegasus.cpp | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 449fa20579..2dae8f4f60 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -239,6 +239,9 @@ bool PegasusEngine::detectOpeningClosingDirectory() {  void PegasusEngine::createItems() {  	Common::SeekableReadStream *res = _resFork->getResource(MKTAG('N', 'I', 't', 'm'), 0x80); +	if (!res) +		error("Couldn't find neighborhood items resource"); +  	uint16 entryCount = res->readUint16BE();  	for (uint16 i = 0; i < entryCount; i++) { | 
