diff --git a/gedcom b/gedcom index 9047130..2ab7345 100755 --- a/gedcom +++ b/gedcom @@ -10835,9 +10835,10 @@ sub get_all_residences my $nextnext = $iterator->peek(2); last if(!defined($nextnext)); my $place = place({ person => $person, record => $current, nopreposition => 1 }); + next if(!defined($place)); my $nextplace = place({ person => $person, record => $next, nopreposition => 1 }); my $nextnextplace = place({ person => $person, record => $nextnext, nopreposition => 1 }); - if(($nextnextplace eq $place) && ($nextplace ne $place)) { + if(defined($nextnextplace) && ($nextnextplace eq $place) && ($nextplace ne $place)) { my @locations = get_location($place); my @nextlocations = get_location($nextplace);