Commit.tree, check for no memory error

This commit is contained in:
J. David Ibáñez 2011-11-19 17:43:52 +01:00
parent ce41de9417
commit fb1ca247f8

@ -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;