Edit Book: Reports tool: Fix double clicking on an unused image causing an error

This commit is contained in:
Kovid Goyal 2015-02-18 13:18:26 +05:30
parent 0e2de4306c
commit e07fc77a52

View File

@ -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() # }}}