Skip to content

Commit 1ae0bfe

Browse files
committed
fixup! Incref a valid pointer
1 parent 308f0f2 commit 1ae0bfe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/runtime/methodbinding.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ public MethodBinding(MethodObject m, IntPtr target, IntPtr targetType)
2626
{
2727
targetType = Runtime.PyObject_Type(target);
2828
}
29-
Runtime.XIncref(targetType);
29+
else
30+
{
31+
Runtime.XIncref(targetType);
32+
}
33+
3034
this.targetType = targetType;
3135

3236
this.info = null;

0 commit comments

Comments
 (0)