Fix list index out of range
When clicking with the mouse in rows without links, gertty crashes. Change-Id: I0005d76a6804cbdd2d366c6e07f15c1316cfed90
This commit is contained in:
parent
0e80bbf217
commit
9b931602a6
@ -319,7 +319,11 @@ class HyperText(urwid.Text):
|
||||
def getPosAtCoords(self, maxcol, col, row):
|
||||
trans = self.get_line_translation(maxcol)
|
||||
colpos = 0
|
||||
line = None
|
||||
try:
|
||||
line = trans[row]
|
||||
except IndexError:
|
||||
return None
|
||||
for t in line:
|
||||
if len(t) == 2:
|
||||
width, pos = t
|
||||
|
Loading…
x
Reference in New Issue
Block a user