1
Vote

When a validator fails to set any member names, object ref not set exception thrown while validating

description

private void RaiseErrorsChanged(MetaModelProperty property)
{
if (this.ErrorsChanged == null)
return;
this.ErrorsChanged((object) this, new DataErrorsChangedEventArgs(property.Name)); // property == null
}
 
It doesn't error further upstream as the SetErrors method does check to see if property is null.
private void SetErrors(MetaModelProperty property, IEnumerable<ValidationResult> results)
{
string propertyName = property != null ? property.Name : string.Empty;
.....

comments