diff options
author | Xabier Rodriguez Calvar <calvaris@igalia.com> | 2018-03-13 13:48:00 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2018-03-13 10:21:36 -0300 |
commit | 8db603f8c845f194ecdaedf51a7aa2de739e40c4 (patch) | |
tree | 792380140a34f9fdf08fe35aec9c49cdf5d9d5bd | |
parent | 70dcd99599b1dbffde8de4a12822af9780b785bb (diff) |
debug-viewer: solved crash when maximum freq sentinel is 0
https://bugzilla.gnome.org/show_bug.cgi?id=794282
-rw-r--r-- | debug-viewer/GstDebugViewer/Plugins/Timeline.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/debug-viewer/GstDebugViewer/Plugins/Timeline.py b/debug-viewer/GstDebugViewer/Plugins/Timeline.py index 91881ff..2ad3599 100644 --- a/debug-viewer/GstDebugViewer/Plugins/Timeline.py +++ b/debug-viewer/GstDebugViewer/Plugins/Timeline.py @@ -725,7 +725,11 @@ class TimelineWidget (Gtk.DrawingArea): if not data: 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) for i in range(len(heights)): ctx.line_to(i - .5, height - heights[i] + .5) |