diff --git a/hgext/graphlog.py b/hgext/graphlog.py
index f32a2989ff585f0f452f25806750477fc631fc9a_aGdleHQvZ3JhcGhsb2cucHk=..eb87fbc6d7020f02cb80c1c0de72ab4977283c8c_aGdleHQvZ3JhcGhsb2cucHk= 100644
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -95,6 +95,8 @@
         elif start == end:
             interline[2 * start] = "|"
         else:
+            if 2 * end >= len(nodeline):
+                continue
             nodeline[2 * end] = "+"
             if start > end:
                 (start, end) = (end, start)