From 8db603f8c845f194ecdaedf51a7aa2de739e40c4 Mon Sep 17 00:00:00 2001 From: Xabier Rodriguez Calvar Date: Tue, 13 Mar 2018 13:48:00 +0100 Subject: [PATCH] debug-viewer: solved crash when maximum freq sentinel is 0 https://bugzilla.gnome.org/show_bug.cgi?id=794282 --- debug-viewer/GstDebugViewer/Plugins/Timeline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.7.4