aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/resource.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index eb786bce03..78b641c9de 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -2918,6 +2918,9 @@ Common::String ResourceManager::findSierraGameId(const bool isBE) {
heap = findResource(ResourceId(kResourceTypeScript, 0), false);
Resource *vocab = findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS), false);
+ if (!vocab)
+ return "";
+
const uint16 numSelectors = isBE ? vocab->getUint16BEAt(0) : vocab->getUint16LEAt(0);
for (uint16 i = 0; i < numSelectors; ++i) {
uint16 selectorOffset;