summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authoryorah <yoram.harmelin@gmail.com>2013-07-03 17:07:20 +0200
committeryorah <yoram.harmelin@gmail.com>2013-07-03 17:22:12 +0200
commit9b6075b25fb6fef570dd29c2b797db8bc34cf0b1 (patch)
tree18f3b3e105345b0dcc9c9a99447a24c6a3af3a4e /src/diff.c
parent6bb7bff274be004768ccedf76643383494e2a9dc (diff)
downloadlibgit2-9b6075b25fb6fef570dd29c2b797db8bc34cf0b1.tar.gz
Fix segfault in git_status_foreach_ext()
Add tests for the `GIT_STATUS_SHOW_XXX` flags.
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index 26e117402..9e9528ef9 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1273,7 +1273,7 @@ int git_diff__paired_foreach(
git_vector_sort(&idx2wd->deltas);
}
}
- else if (head2idx->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE)
+ else if (head2idx != NULL && head2idx->opts.flags & GIT_DIFF_DELTAS_ARE_ICASE)
strcomp = git__strcasecmp;
for (i = 0, j = 0; i < i_max || j < j_max; ) {