diff options
Diffstat (limited to 'src/wx/audio_plot.cc')
| -rw-r--r-- | src/wx/audio_plot.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index 96de34d40..0868d931a 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)); } |
