diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-02-11 12:04:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-02-11 12:04:27 +0000 |
| commit | 8aeb741ccbe2edb528e98a431bf55459a6836a9b (patch) | |
| tree | a14569b531d9867683a1ac1c94c8e0eb406906a8 /src/wx/audio_plot.cc | |
| parent | 4ba8772aef261da209bbb882325fd61a8b479fd7 (diff) | |
| parent | 22f2cd94132f93a159c2ce9fe263771cb5a5dbdf (diff) | |
Merge master.
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)); } |
