diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 449fa205799..2dae8f4f60e 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++) {