Skip to content

Commit 048b22e

Browse files
authored
Update Help.cs (#1968)
Fix Object reference not set to an instance of an object. for shell help command
1 parent c8a9bcd commit 048b22e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LiteDB.Shell/Commands/Help.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void Execute(StringScanner s, Env env)
2828
// getting all HelpAttributes inside assemblies
2929
var helps = AppDomain.CurrentDomain.GetAssemblies()
3030
.SelectMany(x => x.GetTypes())
31-
.Select(x => CustomAttributeExtensions.GetCustomAttributes(typeof(HelpAttribute), true).FirstOrDefault())
31+
.Select(x => CustomAttributeExtensions.GetCustomAttributes(x, typeof(HelpAttribute), true).FirstOrDefault())
3232
.Where(x => x != null)
3333
.Select(x => x as HelpAttribute)
3434
.ToArray();
@@ -49,4 +49,4 @@ public void Execute(StringScanner s, Env env)
4949
}
5050
}
5151
}
52-
}
52+
}

0 commit comments

Comments
 (0)