File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/GitVersion.LibGit2Sharp/Git Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ internal class GitObject : IGitObject
99
1010 internal GitObject ( LibGit2Sharp . GitObject innerGitObject )
1111 {
12+ if ( innerGitObject == null )
13+ throw new ArgumentNullException ( nameof ( innerGitObject ) ) ;
14+
1215 Id = new ObjectId ( innerGitObject . Id ) ;
1316 Sha = innerGitObject . Sha ;
1417 }
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ internal sealed class ObjectId : IObjectId
88 private static readonly LambdaKeyComparer < IObjectId , string > comparerHelper = new ( x => x . Sha ) ;
99
1010 private readonly LibGit2Sharp . ObjectId innerObjectId ;
11- internal ObjectId ( LibGit2Sharp . ObjectId objectId ) => this . innerObjectId = objectId ;
11+
12+ internal ObjectId ( LibGit2Sharp . ObjectId objectId ) =>
13+ this . innerObjectId = objectId ?? throw new ArgumentNullException ( nameof ( objectId ) ) ;
1214
1315 public ObjectId ( string sha ) : this ( new LibGit2Sharp . ObjectId ( sha ) )
1416 {
You can’t perform that action at this time.
0 commit comments