File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
28
28
- Fixed conversion of 'float' and 'double' values (#486)
29
29
- Fixed 'clrmethod' for python 2 (#492)
30
30
- Fixed double calling of constructor when deriving from .NET class (#495)
31
+ - Fixed `clr.GetClrType` when iterating over `System` members (#607)
31
32
32
33
33
34
## [2.3.0][] - 2017-03-11
Original file line number Diff line number Diff line change 1
- using System;
1
+ using System;
2
2
using System.Runtime.InteropServices;
3
3
4
4
namespace Python.Runtime
@@ -34,6 +34,10 @@ internal static ManagedType GetManagedObject(IntPtr ob)
34
34
IntPtr op = tp == ob
35
35
? Marshal.ReadIntPtr(tp, TypeOffset.magic())
36
36
: Marshal.ReadIntPtr(ob, ObjectOffset.magic(ob));
37
+ if (op == IntPtr.Zero)
38
+ {
39
+ return null;
40
+ }
37
41
var gc = (GCHandle)op;
38
42
return (ManagedType)gc.Target;
39
43
}
You can’t perform that action at this time.
0 commit comments