From f637bad0d9008dcac736b20cad18e0f6759f7838 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 19 Mar 2026 23:00:23 +1100 Subject: [PATCH] fix: sparkline div by 0 --- plugin/src/Caelestia/Internal/sparklineitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/src/Caelestia/Internal/sparklineitem.cpp b/plugin/src/Caelestia/Internal/sparklineitem.cpp index b4938d1d..5ffcc2f8 100644 --- a/plugin/src/Caelestia/Internal/sparklineitem.cpp +++ b/plugin/src/Caelestia/Internal/sparklineitem.cpp @@ -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();