From 7f7a512e66dfb0fc447b133fa16f30f220338a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= Date: Fri, 5 Aug 2011 12:52:43 +0200 Subject: [PATCH] Fix issue #39, add missing Py_INCREF --- pygit2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pygit2.c b/pygit2.c index 1963ef0..623ad63 100644 --- a/pygit2.c +++ b/pygit2.c @@ -425,6 +425,7 @@ Repository_get_index(Repository *self, void *closure) py_index = (Index*)IndexType.tp_alloc(&IndexType, 0); if (!py_index) return PyErr_NoMemory(); + Py_INCREF(self); py_index->repo = self; py_index->index = index; py_index->own_obj = 0;