Blob Blame History Raw
diff -rupN Clementine-1.3.1.org/src/analyzers/analyzerbase.cpp Clementine-1.3.1/src/analyzers/analyzerbase.cpp
--- Clementine-1.3.1.org/src/analyzers/analyzerbase.cpp	2016-04-19 11:08:35.000000000 -0400
+++ Clementine-1.3.1/src/analyzers/analyzerbase.cpp	2018-05-30 02:19:53.938791531 -0400
@@ -106,6 +106,7 @@ void Analyzer::Base::paintEvent(QPaintEv
       const Engine::Scope& thescope = engine_->scope(timeout_);
       int i = 0;
 
+      lastScope_.resize(fht_->size());
       // convert to mono here - our built in analyzers need mono, but the
       // engines provide interleaved pcm
       for (uint x = 0; static_cast<int>(x) < fht_->size(); ++x) {
@@ -225,7 +226,7 @@ QColor Analyzer::Base::getPsychedelicCol
   // Calculate total magnitudes for different bark bands.
   double bands[sBarkBandCount]{};
 
-  for (int i = 0; i < barkband_table_.size(); ++i) {
+  for (int i = 0; i < std::min(barkband_table_.size(), (int)scope.size()); ++i) {
     bands[barkband_table_[i]] += scope[i];
   }