Skip to content

Commit 129d703

Browse files
author
J Wyman
committed
Fixes NRE issues found by Covertity in Repository.cs
1 parent 7202df7 commit 129d703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LibGit2Sharp/Repository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ internal GitObject LookupInternal(ObjectId id, GitObjectType type, FilePath know
476476

477477
using (GitObjectSafeHandle obj = Proxy.git_object_lookup(handle, id, type))
478478
{
479-
if (obj == null)
479+
if (obj == null || obj.IsInvalid)
480480
{
481481
return null;
482482
}

0 commit comments

Comments
 (0)