projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge master.
[dcpomatic.git]
/
src
/
wx
/
audio_plot.cc
diff --git
a/src/wx/audio_plot.cc
b/src/wx/audio_plot.cc
index 96de34d406744960db60c4aa072a0673699c9c2d..0868d931a8be1d38dc7b95e0c154afce4e544a51 100644
(file)
--- 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));
}