summaryrefslogtreecommitdiff
path: root/backref.c
diff options
context:
space:
mode:
Diffstat (limited to 'backref.c')
-rw-r--r--backref.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/backref.c b/backref.c
index 51553c70..23a394ed 100644
--- a/backref.c
+++ b/backref.c
@@ -505,6 +505,12 @@ static void __merge_refs(struct pref_state *prefstate, int mode)
if (!ref_for_same_block(ref1, ref2))
continue;
} else {
+ /*
+ * Parent == 0 means that the ref is tree block
+ * backref or its parent is unresolved.
+ */
+ if (!ref1->parent || !ref2->parent)
+ continue;
if (ref1->parent != ref2->parent)
continue;
}