diff -up Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp.lastscope Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp --- Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp.lastscope 2018-10-05 11:56:49.000000000 +0200 +++ Clementine-fb00835468295925a6945a286406a2eec6bdb67a/src/analyzers/analyzerbase.cpp 2018-10-21 00:36:34.063123150 +0200 @@ -107,6 +107,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(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 < scope.size(); ++i) { + for (int i = 0; i < std::min(barkband_table_.size(), (int)scope.size()); ++i) { bands[barkband_table_[i]] += scope[i]; }