diff --git a/src/chartbackground.cpp b/src/chartbackground.cpp index edac96f..e1e8396 100644 --- a/src/chartbackground.cpp +++ b/src/chartbackground.cpp @@ -83,6 +83,7 @@ void ChartBackground::paint(QPainter *painter, const QStyleOptionGraphicsItem *o int ChartBackground::roundness(qreal size) const { + if(qFuzzyIsNull(size)) return 0; return 100*m_diameter/int(size); }