mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
Fix crash when range filtering
Regression from 25cfe9 (timeline: make log level calculation a lot faster).
This commit is contained in:
parent
ca6aee7388
commit
bf28e9464e
1 changed files with 10 additions and 1 deletions
|
@ -404,7 +404,16 @@ class SubRange (object):
|
|||
|
||||
def __getitem__ (self, i):
|
||||
|
||||
return self.l[i + self.start]
|
||||
if isinstance (i, slice):
|
||||
stop = i.stop
|
||||
if stop >= 0:
|
||||
stop += self.start
|
||||
else:
|
||||
stop += self.stop
|
||||
|
||||
return self.l[i.start + self.start:stop]
|
||||
else:
|
||||
return self.l[i + self.start]
|
||||
|
||||
def __len__ (self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue