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][].
2828- Fixed conversion of 'float' and 'double' values (#486 )
2929- Fixed 'clrmethod' for python 2 (#492 )
3030- Fixed double calling of constructor when deriving from .NET class (#495 )
31+ - Fixed ` clr.GetClrType ` when iterating over ` System ` members (#607 )
3132
3233
3334## [ 2.3.0] [ ] - 2017-03-11
Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Runtime . InteropServices ;
33
44namespace Python . Runtime
@@ -34,6 +34,10 @@ internal static ManagedType GetManagedObject(IntPtr ob)
3434 IntPtr op = tp == ob
3535 ? Marshal . ReadIntPtr ( tp , TypeOffset . magic ( ) )
3636 : Marshal . ReadIntPtr ( ob , ObjectOffset . magic ( ob ) ) ;
37+ if ( op == IntPtr . Zero )
38+ {
39+ return null ;
40+ }
3741 var gc = ( GCHandle ) op ;
3842 return ( ManagedType ) gc . Target ;
3943 }
You can’t perform that action at this time.
0 commit comments