Skip to content
This repository was archived by the owner on Sep 26, 2019. It is now read-only.

Commit 9b93160

Browse files
mrungejeblair
authored andcommitted
Fix list index out of range
When clicking with the mouse in rows without links, gertty crashes. Change-Id: I0005d76a6804cbdd2d366c6e07f15c1316cfed90
1 parent 0e80bbf commit 9b93160

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gertty/mywid.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,11 @@ def keypress(self, size, key):
319319
def getPosAtCoords(self, maxcol, col, row):
320320
trans = self.get_line_translation(maxcol)
321321
colpos = 0
322-
line = trans[row]
322+
line = None
323+
try:
324+
line = trans[row]
325+
except IndexError:
326+
return None
323327
for t in line:
324328
if len(t) == 2:
325329
width, pos = t

0 commit comments

Comments
 (0)