Fix DIV0 crash in Overview

.. possible cause of crash reported on the forums.
This commit is contained in:
Mark Liversedge
2021-08-18 08:38:37 +01:00
parent f9fa6ca401
commit 29485aa327

View File

@@ -2664,7 +2664,7 @@ void
DataOverviewItem::itemPaint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) {
// paint nothing if no values - or a mismatch
if (values.count() < names.count()) return;
if (names.count() == 0 || values.count() == 0 || values.count() < names.count()) return;
// step 1: calculate paint metrics, colors, fonts, margins etc etc ...