X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tree-diff.c;h=382092bce0be4ac82098ccc9c19d52df80f4eafd;hb=d41df15e6913e8f7e1b5d656bb51dc4268232c36;hp=0ef06a9e36f55c0caec51064f552decd8a58be13;hpb=3eeb419968c1f8f0a762a7127db770e9d9c8037d;p=git.git diff --git a/tree-diff.c b/tree-diff.c index 0ef06a9e..382092bc 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -263,6 +263,10 @@ void diff_tree_setup_paths(const char **p) paths = p; nr_paths = count_paths(paths); + if (nr_paths == 0) { + pathlens = NULL; + return; + } pathlens = xmalloc(nr_paths * sizeof(int)); for (i=0; i