1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-04 21:50:51 +01:00

Bug 828 (partial) - Don't divide by zero in Contrast dialog

This commit is contained in:
Paul-Licameli
2015-04-09 19:21:39 -04:00
parent a583fafbb7
commit e26ab98e0e

View File

@@ -1734,7 +1734,7 @@ bool WaveTrack::GetRMS(float *rms, double t0, double t1)
}
}
}
*rms = sqrt(sumsq/length);
*rms = length > 0.0 ? sqrt(sumsq / length) : 0.0;
return result;
}