aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/voyeur/files_threads.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 98fe0d0bbf..700944f7ef 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -86,6 +86,9 @@ bool ThreadResource::loadAStack(int stackId) {
}
void ThreadResource::unloadAStack(int stackId) {
+ if (stackId < 0)
+ return;
+
if ((_vm->_stampFlags & 1) && _useCount[stackId]) {
if (--_useCount[stackId] == 0) {
_vm->_stampLibPtr->freeBoltMember(_vm->_controlPtr->_memberIds[stackId]);