Skip to content

Commit

Permalink
Fix zero div crash in Overview Data Table when names() returns an error
Browse files Browse the repository at this point in the history
Found while removing sport parameter from zones.
  • Loading branch information
amtriathlon committed Aug 2, 2021
1 parent 7e998d9 commit fd384d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Charts/OverviewItems.cpp
Expand Up @@ -873,9 +873,9 @@ DataOverviewItem::postProcess()
if (units[i] == tr("seconds"))
units[i] = "";

// if we have more values than columns then show as rows
// if we have some columns and more values than columns then show as rows
// otherwise its a simple 3 column table; name value unit
multirow = (values.count() > names.count());
multirow = (names.count() > 0 && values.count() > names.count());

// what are the max column sizes
QFontMetrics fm(parent->midfont);
Expand Down

0 comments on commit fd384d6

Please sign in to comment.