From f31e016200c34542337016cf99677f16290b1544 2012-08-28 15:22:54 From: Michal Klocek Date: 2012-08-28 15:22:54 Subject: [PATCH] Minor, check for potentical division by zero in chartbackgorund --- 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); }