From 048b22e290b3c495a09b3f034e5cba7b852c9e2d Mon Sep 17 00:00:00 2001 From: Simon Hoss Date: Thu, 30 Dec 2021 19:59:01 +0100 Subject: [PATCH] Update Help.cs (#1968) Fix Object reference not set to an instance of an object. for shell help command --- LiteDB.Shell/Commands/Help.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LiteDB.Shell/Commands/Help.cs b/LiteDB.Shell/Commands/Help.cs index 57b859eb6..fbe522582 100644 --- a/LiteDB.Shell/Commands/Help.cs +++ b/LiteDB.Shell/Commands/Help.cs @@ -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(); @@ -49,4 +49,4 @@ public void Execute(StringScanner s, Env env) } } } -} \ No newline at end of file +}