Skip to content

Commit

Permalink
Obj reached not through tree caused Segmentation fault
Browse files Browse the repository at this point in the history
  • Loading branch information
buhl committed Apr 18, 2020
1 parent 06c2fd5 commit cb20c8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ PyDoc_STRVAR(Object_raw_name__doc__, "Name (bytes).");
PyObject *
Object_raw_name__get__(Object *self)
{
if (self->entry == NULL)
Py_RETURN_NONE;

return PyBytes_FromString(git_tree_entry_name(self->entry));
}

Expand Down

0 comments on commit cb20c8d

Please sign in to comment.