Skip to content

Commit

Permalink
Update Help.cs (#1968)
Browse files Browse the repository at this point in the history
Fix Object reference not set to an instance of an object. for shell help command
  • Loading branch information
simonhoss authored Dec 30, 2021
1 parent c8a9bcd commit 048b22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteDB.Shell/Commands/Help.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void Execute(StringScanner s, Env env)
// getting all HelpAttributes inside assemblies
var helps = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(x => x.GetTypes())
.Select(x => CustomAttributeExtensions.GetCustomAttributes(typeof(HelpAttribute), true).FirstOrDefault())
.Select(x => CustomAttributeExtensions.GetCustomAttributes(x, typeof(HelpAttribute), true).FirstOrDefault())
.Where(x => x != null)
.Select(x => x as HelpAttribute)
.ToArray();
Expand All @@ -49,4 +49,4 @@ public void Execute(StringScanner s, Env env)
}
}
}
}
}

0 comments on commit 048b22e

Please sign in to comment.