summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/class/agent.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php
index 6d0e20d..b4e6702 100644
--- a/app/class/agent.class.php
+++ b/app/class/agent.class.php
@@ -37,7 +37,10 @@ abstract class agent extends obj
*/
public function isOwnerOf(obj $obj) : bool
{
- return $obj->getOwner()->guid == $this->guid;
+ if (!($own = $obj->getOwner()))
+ return false;
+
+ return $own->guid == $this->guid;
}
/*