Skip to content

Commit

Permalink
check self for null
Browse files Browse the repository at this point in the history
  • Loading branch information
jany-tenaj committed Dec 4, 2018
1 parent ca7ca8f commit 9affc6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/DotSpatial.Symbology/LegendItemExt.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class LegendItemExt
/// <returns>The found member.</returns> /// <returns>The found member.</returns>
public static ILegendItem BottomMember(this ILegendItem self) public static ILegendItem BottomMember(this ILegendItem self)
{ {
if (self.LegendItems != null && self.LegendItems.Any()) if (self?.LegendItems != null && self.LegendItems.Any())
{ {
var items = self.LegendItems.ToList(); var items = self.LegendItems.ToList();


Expand Down

0 comments on commit 9affc6a

Please sign in to comment.