diff --git a/qutebrowser/utils/usertypes.py b/qutebrowser/utils/usertypes.py index 585a57b9e..e19dd6bf4 100644 --- a/qutebrowser/utils/usertypes.py +++ b/qutebrowser/utils/usertypes.py @@ -104,7 +104,10 @@ class NeighborList: def curitem(self): """Get the current item in the list.""" - return self._items[self.idx] + if self.idx is not None: + return self._items[self.idx] + else: + raise IndexError("No current item!") def nextitem(self): """Get the next item in the list."""