We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 746e147 commit 2f7a40aCopy full SHA for 2f7a40a
LibGit2Sharp/Core/Handles/OidSafeHandle.cs
@@ -6,7 +6,7 @@ internal class OidSafeHandle : NotOwnedSafeHandleBase
6
{
7
private GitOid? MarshalAsGitOid()
8
9
- return (GitOid?)Marshal.PtrToStructure(handle, typeof(GitOid));
+ return IsInvalid ? null : (GitOid?)Marshal.PtrToStructure(handle, typeof(GitOid));
10
}
11
12
public ObjectId MarshalAsObjectId()
0 commit comments