Commit 43c6dd6f by Vicent Martí

Merge pull request #537 from nulltoken/fix/download-segfault

Fix download segfault
parents 1744fafe c3ec2ec2
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment