Browse Source

2010-05-25 Jérémie Laval <[email protected]>

In class/System.Core/System.Linq/:
   * ParallelExecuter.cs: Fix NRE caused by lambda wrapping

svn path=/trunk/mcs/; revision=157856
Jérémie Laval 15 years ago
parent
commit
32d1d3e231

+ 4 - 0
mcs/class/System.Core/System.Linq/ChangeLog

@@ -1,3 +1,7 @@
+2010-05-25  Jérémie Laval  <[email protected]>
+
+	* ParallelExecuter.cs: Fix NRE caused by lambda wrapping
+
 2010-05-25  Jb Evain  <[email protected]>
 
 	* Enumerable.cs: make Reverse lazier. Based on a patch by

+ 5 - 1
mcs/class/System.Core/System.Linq/ParallelExecuter.cs

@@ -85,7 +85,11 @@ namespace System.Linq
 		                                                   Action endAction,
 		                                                   QueryOptions options)
 		{
-			return Process<TSource, TElement> (node, (e, i) => call (e), acquisitionFunc, (i) => endAction (), options);
+			return Process<TSource, TElement> (node,
+			                                   (e, i) => call (e),
+			                                   acquisitionFunc,
+			                                   endAction == null ? ((Action<int>)null) : (i) => endAction (),
+			                                   options);
 		}
 
 		internal static Task[] Process<TSource, TElement> (QueryBaseNode<TSource> node, Action<TElement, int> call,