From d8a2e55855b50eda28ec7d394449274f5e085bd6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 5 Feb 2014 14:52:23 +0000 Subject: Fix some coverity-reported stuff. --- src/wx/audio_plot.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wx/audio_plot.cc') diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index f78885772..fd2619255 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -259,7 +259,9 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel) const p += pow (*j, 2); } - p = sqrt (p / smoothing.size ()); + if (smoothing.size() > 0) { + p = sqrt (p / smoothing.size ()); + } path.AddLineToPoint (_db_label_width + i * _x_scale, y_for_linear (p)); } -- cgit v1.2.3