Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return null if null array is passed to ValueConverter.

  • Loading branch information...
commit 1e98fb5e214a371b2a7678525d43181260a4cbb5 1 parent 93c2f2e
@lanwin lanwin authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  source/MongoDB/Configuration/Mapping/Util/ValueConverter.cs
View
3  source/MongoDB/Configuration/Mapping/Util/ValueConverter.cs
@@ -43,6 +43,9 @@ public static object Convert(object value, Type type)
public static Array ConvertArray(object[] elements, Type type)
{
+ if(elements == null)
+ return null;
+
var array = Array.CreateInstance(type, elements.Length);
for(var i = 0; i < elements.Length; i++)
Please sign in to comment.
Something went wrong with that request. Please try again.