[Scummvm-git-logs] scummvm master -> acac59796174150350d65aeda3593df8d0076d8b

whiterandrek whiterandrek at gmail.com
Fri Nov 16 19:34:48 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
acac597961 PINK: fixed null pointer dereference in ConditionInventoryItemOwner


Commit: acac59796174150350d65aeda3593df8d0076d8b
    https://github.com/scummvm/scummvm/commit/acac59796174150350d65aeda3593df8d0076d8b
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2018-11-16T20:34:27+02:00

Commit Message:
PINK: fixed null pointer dereference in ConditionInventoryItemOwner
fixes bug #10805

Changed paths:
    engines/pink/objects/condition.cpp


diff --git a/engines/pink/objects/condition.cpp b/engines/pink/objects/condition.cpp
index f20c25e..646da7d 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() {





More information about the Scummvm-git-logs mailing list