Permalink
Browse files

check self for null

  • Loading branch information...
jany-tenaj committed Dec 4, 2018
1 parent ca7ca8f commit 9affc6a57036a8ef4ed3579f8ba37a27b7937aaf
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/DotSpatial.Symbology/LegendItemExt.cs
@@ -21,7 +21,7 @@ public static class LegendItemExt
/// <returns>The found member.</returns>
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();

0 comments on commit 9affc6a

Please sign in to comment.