Add assert.
authorCarl Hetherington <cth@carlh.net>
Fri, 21 Apr 2017 08:32:54 +0000 (09:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 21 Apr 2017 08:32:54 +0000 (09:32 +0100)
src/lib/audio_analysis.cc

index 022c593..16deacb 100644 (file)
@@ -178,6 +178,8 @@ AudioAnalysis::gain_correction (shared_ptr<const Playlist> playlist)
 pair<AudioAnalysis::PeakTime, int>
 AudioAnalysis::overall_sample_peak () const
 {
+       DCPOMATIC_ASSERT (!_sample_peak.empty ());
+
        optional<PeakTime> pt;
        int c;