Skip to content

Commit 8cbfcb3

Browse files
committed
Guard against null remote names
1 parent 7b52706 commit 8cbfcb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

LibGit2Sharp/RemoteCollection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public virtual Remote this[string name]
4040

4141
internal Remote RemoteForName(string name, bool shouldThrowIfNotFound = true)
4242
{
43+
Ensure.ArgumentNotNull(name, "name");
44+
4345
using (RemoteSafeHandle handle = Proxy.git_remote_load(repository.Handle, name, shouldThrowIfNotFound))
4446
{
4547
return handle == null ? null : Remote.BuildFromPtr(handle, this.repository);

0 commit comments

Comments
 (0)