Commit.tree, check for no memory error
This commit is contained in:
parent
ce41de9417
commit
fb1ca247f8
3
pygit2.c
3
pygit2.c
@ -1222,6 +1222,9 @@ Commit_get_tree(Commit *commit)
|
||||
return Error_set(err);
|
||||
|
||||
py_tree = PyObject_New(Tree, &TreeType);
|
||||
if (!py_tree)
|
||||
return NULL;
|
||||
|
||||
Py_INCREF(commit->repo);
|
||||
py_tree->repo = commit->repo;
|
||||
py_tree->tree = (git_tree*)tree;
|
||||
|
Loading…
x
Reference in New Issue
Block a user