diff --git a/gramps/plugins/lib/libcairodoc.py b/gramps/plugins/lib/libcairodoc.py index fe02a2acc..fba259597 100644 --- a/gramps/plugins/lib/libcairodoc.py +++ b/gramps/plugins/lib/libcairodoc.py @@ -665,6 +665,8 @@ class GtkDocParagraph(GtkDocBaseElement): markstarts = [] #index is in bytecode in the text.. !! while pos < index: + if realpos >= len(oldtext): + break char = oldtext[realpos] if char == '<' and oldtext[realpos+1] != '/': # a markup starts