Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Jan 31, 2025
1 parent 3afcee2 commit bf1b578
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions projects/GKCore/GKCore/Charts/TreeChartModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2341,9 +2341,8 @@ public List<GDMIndividualRecord> GetAncestors(TreeChartPerson person)

private void GetAncestors(TreeChartPerson person, HashSet<GDMIndividualRecord> ancestors)
{
if (person == null || person.Rec == null) return;

ancestors.Add(person.Rec);
if (person == null) return;
if (person.Rec != null) ancestors.Add(person.Rec);

if (person.Father != null) GetAncestors(person.Father, ancestors);
if (person.Mother != null) GetAncestors(person.Mother, ancestors);
Expand All @@ -2358,7 +2357,8 @@ public List<GDMIndividualRecord> GetDescendants(TreeChartPerson person)

private void GetDescendants(TreeChartPerson person, HashSet<GDMIndividualRecord> descendants)
{
if (person == null || person.Rec == null) return;
if (person == null) return;
if (person.Rec != null) descendants.Add(person.Rec);

int childrenCount = person.GetChildsCount();
for (int i = 0; i < childrenCount; i++) {
Expand Down

0 comments on commit bf1b578

Please sign in to comment.