From cc390f03de4e583d9057091bc5e36e23b1eb472c Mon Sep 17 00:00:00 2001 From: Joe4evr Date: Sat, 24 Jun 2017 02:56:57 +0200 Subject: [PATCH] Fix the off-chance that someone has a property without a getter --- src/Discord.Net.Commands/Utilities/ReflectionUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs b/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs index d9956cdc0..b6ceda426 100644 --- a/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs +++ b/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs @@ -58,7 +58,7 @@ namespace Discord.Commands { foreach (var prop in ownerType.DeclaredProperties) { - if (!prop.GetMethod.IsStatic && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute() == null) + if (prop.GetMethod?.IsStatic == false && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute() == null) result.Add(prop); } ownerType = ownerType.BaseType.GetTypeInfo();