|
@@ -38,7 +38,7 @@ namespace Jint.Runtime.Descriptors.Specialized
|
|
|
{
|
|
|
// attempt to convert the JsValue to the target type
|
|
|
obj = currentValue.ToObject();
|
|
|
- if (obj.GetType() != _propertyInfo.PropertyType)
|
|
|
+ if (obj != null && obj.GetType() != _propertyInfo.PropertyType)
|
|
|
{
|
|
|
obj = _engine.ClrTypeConverter.Convert(obj, _propertyInfo.PropertyType, CultureInfo.InvariantCulture);
|
|
|
}
|