Fix divide by zero error in MoodbarRenderer. Fixes issue 3823.
This commit is contained in:
parent
5fc6804326
commit
bd528a47cd
|
@ -116,7 +116,7 @@ void MoodbarRenderer::Render(const ColorVector& colors, QPainter* p, const QRect
|
|||
b += colors[j].blue();
|
||||
}
|
||||
|
||||
const int n = end - start;
|
||||
const int n = qMax(1, end - start);
|
||||
screen_colors.append(QColor(r/n, g/n, b/n));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue