Skip to content
Permalink
Browse files

fix: null pointer exception in binding (#1963)

  • Loading branch information...
glennawatson committed Mar 7, 2019
1 parent 9838ca6 commit 9a94d52c018168f05f1665ef4430f21522368d4b
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/ReactiveUI/Bindings/Property/PropertyBinderImplementation.cs
@@ -433,6 +433,11 @@ internal static IBindingTypeConverter GetConverterForTypes(Type lhs, Type rhs)

private static Func<object, object, object[], object> GetSetConverter(Type fromType, Type targetType)
{
if (fromType == null)
{
return null;
}

lock (_setMethodCache)
{
var setter = _setMethodCache.Get((fromType, targetType));
@@ -456,7 +461,7 @@ internal static IBindingTypeConverter GetConverterForTypes(Type lhs, Type rhs)
var defaultGetter = Reflection.GetValueFetcherOrThrow(viewExpression.GetMemberInfo());
object SetThenGet(object paramTarget, object paramValue, object[] paramParams)
{
Func<object, object, object[], object> converter = GetSetConverter(paramValue.GetType(), viewExpression.Type);
Func<object, object, object[], object> converter = GetSetConverter(paramValue?.GetType(), viewExpression.Type);

if (converter == null)
{

0 comments on commit 9a94d52

Please sign in to comment.
You can’t perform that action at this time.