summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
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; ) {