diff --git a/src/moodbar/moodbarrenderer.cpp b/src/moodbar/moodbarrenderer.cpp index ab3846ff8..fa00f5b87 100644 --- a/src/moodbar/moodbarrenderer.cpp +++ b/src/moodbar/moodbarrenderer.cpp @@ -108,7 +108,7 @@ void MoodbarRenderer::Render(const ColorVector& colors, QPainter* p, const QRect uint end = (x + 1) * colors.size() / rect.width(); if (start == end) - end = start + 1; + end = qMin(start + 1, colors.size() - 1); for (uint j=start; j