Fix crash on python3

Python3 does not allow comparing int's to None directly.

Change-Id: Id9e889284096e407d59c3938ecd07427ba42e350
This commit is contained in:
Clint Byrum 2018-11-25 10:04:33 -08:00
parent c20fef1dec
commit 559f6152c6
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ class HyperText(urwid.Text):
pos = self.getPosAtCoords(maxcol, col, row)
index = 0
for item, start, end in self.selectable_items:
if start <= pos <= end:
if pos is not None and start <= pos <= end:
return index
index += 1
return None