From 77e94312d2342be7ed9eee2be615b55db7d447cb Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 6 Feb 2010 16:23:17 +0000 Subject: [PATCH] 3136: Creating a graphical report crashes the report generator svn: r14249 --- src/Filters/Rules/Person/_HasCommonAncestorWith.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Filters/Rules/Person/_HasCommonAncestorWith.py b/src/Filters/Rules/Person/_HasCommonAncestorWith.py index fdd7f0851..3134b1b5f 100644 --- a/src/Filters/Rules/Person/_HasCommonAncestorWith.py +++ b/src/Filters/Rules/Person/_HasCommonAncestorWith.py @@ -82,8 +82,10 @@ class HasCommonAncestorWith(Rule): def has_common_ancestor(self, other): for handle in self.with_people: - if self.ancestor_cache[handle] & \ - self.ancestor_cache[other.handle]: + if ((handle in self.ancestor_cache and + self.ancestor_cache[handle]) & + (other.handle in self.ancestor_cache and + self.ancestor_cache[other.handle])): return True return False