diff options
-rw-r--r-- | engines/pink/objects/condition.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/pink/objects/condition.cpp b/engines/pink/objects/condition.cpp index f20c25e249..646da7d05c 100644 --- a/engines/pink/objects/condition.cpp +++ b/engines/pink/objects/condition.cpp @@ -81,7 +81,9 @@ void ConditionInventoryItemOwner::deserialize(Archive &archive) { bool ConditionInventoryItemOwner::evaluate(Actor *actor) { InventoryMgr *mgr = actor->getInventoryMgr(); InventoryItem *item = mgr->findInventoryItem(_item); - return item->getCurrentOwner() == _owner; + if (item) + return item->getCurrentOwner() == _owner; + return false; } void ConditionInventoryItemOwner::toConsole() { |