mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
debug-viewer: solved crash when maximum freq sentinel is 0
https://bugzilla.gnome.org/show_bug.cgi?id=794282
This commit is contained in:
parent
70dcd99599
commit
8db603f8c8
1 changed files with 5 additions and 1 deletions
|
@ -725,7 +725,11 @@ class TimelineWidget (Gtk.DrawingArea):
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
|
||||||
heights = [height * float(d) / maximum for d in data]
|
if maximum:
|
||||||
|
heights = [height * float(d) / maximum for d in data]
|
||||||
|
else:
|
||||||
|
heights = [0. for d in data]
|
||||||
|
|
||||||
ctx.move_to(0, height)
|
ctx.move_to(0, height)
|
||||||
for i in range(len(heights)):
|
for i in range(len(heights)):
|
||||||
ctx.line_to(i - .5, height - heights[i] + .5)
|
ctx.line_to(i - .5, height - heights[i] + .5)
|
||||||
|
|
Loading…
Reference in a new issue