Skip to content

Commit e5bf57b

Browse files
committed
fixed ArgumentNullException
1 parent ec44dc1 commit e5bf57b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Rubberduck.Core/UI/ViewModelBase.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ protected virtual void OnErrorsChanged(string propertyName = null)
5151

5252
public IEnumerable GetErrors(string propertyName)
5353
{
54-
return _errors.TryGetValue(propertyName, out var errorList)
55-
? errorList
56-
: null;
54+
if (propertyName != null)
55+
{
56+
return _errors.TryGetValue(propertyName, out var errorList)
57+
? errorList
58+
: null;
59+
}
60+
return null;
5761
}
5862

5963
public bool HasErrors => _errors.Any();

0 commit comments

Comments
 (0)