Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea9c3c commit 891ad8cCopy full SHA for 891ad8c
src/runtime/exceptions.cs
@@ -89,8 +89,11 @@ internal static Exception ToException(IntPtr ob)
89
static void ClearOffsetHelper(IntPtr ob, int offset)
90
{
91
var field = Marshal.ReadIntPtr(ob, offset);
92
- Runtime.XDecref(field);
93
- Marshal.WriteIntPtr(ob, offset, IntPtr.Zero);
+ if (field != IntPtr.Zero)
+ {
94
+ Marshal.WriteIntPtr(ob, offset, IntPtr.Zero);
95
+ Runtime.XDecref(field);
96
+ }
97
}
98
99
// As seen in exceptions.c, every derived type must also clean the base.
0 commit comments