Browse Source

Fix the off-chance that someone has a property without a getter

tags/1.0
Joe4evr 8 years ago
parent
commit
cc390f03de
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Commands/Utilities/ReflectionUtils.cs

+ 1
- 1
src/Discord.Net.Commands/Utilities/ReflectionUtils.cs View File

@@ -58,7 +58,7 @@ namespace Discord.Commands
{
foreach (var prop in ownerType.DeclaredProperties)
{
if (!prop.GetMethod.IsStatic && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
if (prop.GetMethod?.IsStatic == false && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
result.Add(prop);
}
ownerType = ownerType.BaseType.GetTypeInfo();


Loading…
Cancel
Save