X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Fplaylist.py;h=52d8df1352e6077ae77651512a8eab1305ba3718;hp=f323ca2b099043875c384e9fcd4831d4288cd495;hb=034303a42d8375bb4fbf9c51e62e204305f6a91a;hpb=f8741021dba93cd5ee42db15346f47f962f394d2 diff --git a/hooke/playlist.py b/hooke/playlist.py index f323ca2..52d8df1 100644 --- a/hooke/playlist.py +++ b/hooke/playlist.py @@ -88,6 +88,8 @@ class NoteIndexList (list): is `None`. """ if value == None: + if self._index >= len(self): # perhaps items have been popped + self._index = len(self) - 1 return self._index return super(NoteIndexList, self).index(value, *args, **kwargs)