diff options
| author | Aaron O'Mullan <[email protected]> | 2015-08-24 21:37:09 +0200 |
|---|---|---|
| committer | Carlos MartÃn Nieto <[email protected]> | 2015-08-31 12:48:11 +0200 |
| commit | 803ef7dad548b1b84c86365d6b61c8b6b4a0cce0 (patch) | |
| tree | 3d81ace645ad46657e91385a21c8ebe3ab6991ae /remote.go | |
| parent | a572b15df69c4b0350a1134045a7e7a66b06de21 (diff) | |
Add nil check on CredentialsCallback wrapper
Diffstat (limited to 'remote.go')
| -rw-r--r-- | remote.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -214,7 +214,9 @@ func credentialsCallback(_cred **C.git_cred, _url *C.char, _username_from_url *C url := C.GoString(_url) username_from_url := C.GoString(_username_from_url) ret, cred := callbacks.CredentialsCallback(url, username_from_url, (CredType)(allowed_types)) - *_cred = cred.ptr + if cred != nil { + *_cred = cred.ptr + } return int(ret) } |
