mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +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,6 +404,15 @@ class SubRange (object):
|
||||||
|
|
||||||
def __getitem__ (self, i):
|
def __getitem__ (self, i):
|
||||||
|
|
||||||
|
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]
|
return self.l[i + self.start]
|
||||||
|
|
||||||
def __len__ (self):
|
def __len__ (self):
|
||||||
|
|
Loading…
Reference in a new issue