diff --git a/src/calibre/gui2/tweak_book/reports.py b/src/calibre/gui2/tweak_book/reports.py index dd397a75ac..0f7b9ef528 100644 --- a/src/calibre/gui2/tweak_book/reports.py +++ b/src/calibre/gui2/tweak_book/reports.py @@ -336,9 +336,10 @@ class Jump(object): self.pos_map.clear() def __call__(self, key, locations): - self.pos_map[key] = (self.pos_map[key] + 1) % len(locations) - loc = locations[self.pos_map[key]] - jump_to_location(loc) + if len(locations): + self.pos_map[key] = (self.pos_map[key] + 1) % len(locations) + loc = locations[self.pos_map[key]] + jump_to_location(loc) jump = Jump() # }}}