8000 Incref a valid pointer · pythonnet/pythonnet@1ecdce8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ecdce8

Browse files
committed
Incref a valid pointer
Addresses comment: #958
1 parent 4ba50a7 commit 1ecdce8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/methodbinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public MethodBinding(MethodObject m, IntPtr target, IntPtr targetType)
2222
Runtime.XIncref(target);
2323
this.target = target;
2424

25-
Runtime.XIncref(targetType);
2625
if (targetType == IntPtr.Zero)
2726
{
2827
targetType = Runtime.PyObject_Type(target);
2928
}
29+
Runtime.XIncref(targetType);
3030
this.targetType = targetType;
3131

3232
this.info = null;

0 commit comments

Comments
 (0)
0