Avoid segfault when libgit2 doesn't report an error
Merge pull request #184 from nviennot/fix-segfault-no-error

Avoid segfault when libgit2 doesn't report an error