X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=tree-diff.c;h=382092bce0be4ac82098ccc9c19d52df80f4eafd;hb=5ea06e2014a910240408f74b9dab2128a30fd06c;hp=0ef06a9e36f55c0caec51064f552decd8a58be13;hpb=ac1b3d1248f36b26c2eab55022b9a54bde36b1ee;p=git.git diff --git a/tree-diff.c b/tree-diff.c index 0ef06a9e3..382092bce 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