diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-01-18 15:29:51 -0800 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-01-18 15:29:51 -0800 |
| commit | 43c6dd6fb02ec253b7e8aaf249d0070b253a6c83 (patch) | |
| tree | ccf1c01462b4db1c8feb7ce2c79115d032b4e3f9 /src | |
| parent | 1744fafec05d8fa3036a43f5e390c790810b05a5 (diff) | |
| parent | c3ec2ec262eb72cfc6783316e18aef12fb791d3f (diff) | |
| download | libgit2-43c6dd6fb02ec253b7e8aaf249d0070b253a6c83.tar.gz | |
Merge pull request #537 from nulltoken/fix/download-segfault
Fix download segfault
Diffstat (limited to 'src')
| -rw-r--r-- | src/refspec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refspec.c b/src/refspec.c index 7ce32ba14..7694be525 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -57,7 +57,7 @@ const char *git_refspec_dst(const git_refspec *refspec) int git_refspec_src_match(const git_refspec *refspec, const char *refname) { - return refspec == NULL ? GIT_ENOMATCH : git__fnmatch(refspec->src, refname, 0); + return (refspec == NULL || refspec->src == NULL) ? GIT_ENOMATCH : git__fnmatch(refspec->src, refname, 0); } int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name) |
