Merge pull request #2573 from BrzVlad/fix-conc-memusage
[mono.git] / mcs / class / corlib / System / DelegateSerializationHolder.cs
index 74d704422d2b24bc746a13823b2eabc799965525..91cbb36e24fd1fefdd77f9522ce39565bcc4315f 100644 (file)
@@ -71,7 +71,7 @@ namespace System
                                        realTarget = info.GetValue (target.ToString(), typeof(object));
 
                                var key = "method" + index;
-                               var method = info.HasKey (key) ? (MethodInfo)info.GetValue (key, typeof (MethodInfo)) : null;
+                               var method = (MethodInfo)info.GetValueNoThrow (key, typeof(MethodInfo));
 
                                Assembly dasm = Assembly.Load (assembly);
                                Type dt = dasm.GetType (type);