In System:
[mono.git] / mcs / class / corlib / System / RuntimeMethodHandle.cs
index bff94af25a8a51815e0bf7430856adbc0015fe2f..8f2266cfe36c6b67bf2a0ee46374f42764059043 100644 (file)
@@ -77,6 +77,9 @@ namespace System
                        if (info == null)
                                throw new ArgumentNullException ("info");
 
+                       if (value == IntPtr.Zero)
+                               throw new SerializationException ("Object fields may not be properly initialized");
+
                        info.AddValue ("MethodObj", (MonoMethod) MethodBase.GetMethodFromHandle (this), typeof (MonoMethod));
                }