fix: sparkline div by 0
This commit is contained in:
parent
bf90d38a23
commit
f637bad0d9
1 changed files with 3 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue