summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/models.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 6600bfaf6..e16312845 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1448,7 +1448,7 @@ void YearlyStatisticsModel::update_yearly_stats()
}
- if (stats_by_trip != NULL ) {
+ if (stats_by_trip != NULL && stats_by_trip[0].is_trip == TRUE) {
YearStatisticsItem *item = new YearStatisticsItem(stats_by_trip[0]);
for (i = 1; stats_by_trip != NULL && stats_by_trip[i].is_trip; ++i) {
YearStatisticsItem *iChild = new YearStatisticsItem(stats_by_trip[i]);