We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d73e7f7 commit 024a3f1Copy full SHA for 024a3f1
1 file changed
Gui/Views/ExtendedPropertyGrid.cs
@@ -117,8 +117,11 @@ public override bool HandlePropertyChanged(PropertyCellContext context)
117
? (uint8_t)costIndexProperty.GetValue(target)!
118
: (uint8_t)0;
119
120
- var designedYearProperty = TypeDescriptor.GetProperties(target)[currencyAttr.DesignedYearPropertyName];
121
- var designedYear = designedYearProperty != null
+ var designedYearProperty = currencyAttr.DesignedYearPropertyName is null
+ ? null
122
+ : TypeDescriptor.GetProperties(target)[currencyAttr.DesignedYearPropertyName];
123
+
124
+ var designedYear = designedYearProperty is not null
125
? (uint16_t)designedYearProperty.GetValue(target)!
126
: (uint16_t)1950;
127
0 commit comments