fix: sparkline div by 0

This commit is contained in:
2 * r + 2 * t 2026-03-19 23:00:23 +11:00
parent bf90d38a23
commit f637bad0d9

View file

@ -27,6 +27,9 @@ void SparklineItem::paint(QPainter* painter) {
}
void SparklineItem::drawLine(QPainter* painter, CircularBuffer* buffer, const QColor& color, qreal fillAlpha) {
if (m_historyLength < 2)
return;
const qreal w = width();
const qreal h = height();
const int len = buffer->count();