Skip to content

Commit

Permalink
Fixed a NullReferenceException that occurs when selecting the Boundin…
Browse files Browse the repository at this point in the history
…gBox item of a linked element. (#28)
  • Loading branch information
yk35 authored May 9, 2024
1 parent 8b1cadb commit d3c03f7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public Element_BoundingBox() : base((document, element) => element.get_BoundingB
private static IEnumerable<SnoopableObject> Snoop(Document document, Element element)
{
yield return new SnoopableObject(document, null, new[] { new SnoopableObject(document, element.get_BoundingBox(null)) }) { NamePrefix = "view:" };
yield return new SnoopableObject(document, null, new[] { new SnoopableObject(document, element.get_BoundingBox(document.ActiveView)) }) { NamePrefix = "view:", Name = "Active view: " + document.ActiveView.Name };
if (document.ActiveView != null)
{
yield return new SnoopableObject(document, null, new[] { new SnoopableObject(document, element.get_BoundingBox(document.ActiveView)) }) { NamePrefix = "view:", Name = "Active view: " + document.ActiveView.Name };
}

}
}
Expand Down

0 comments on commit d3c03f7

Please sign in to comment.