diff --git a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/columns/DistanceFromAllTimeHighColumn.java b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/columns/DistanceFromAllTimeHighColumn.java index 11aea5fef4..f01413d1e8 100644 --- a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/columns/DistanceFromAllTimeHighColumn.java +++ b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/columns/DistanceFromAllTimeHighColumn.java @@ -76,8 +76,10 @@ public DistanceFromAllTimeHighColumn(Supplier dateProvider, List { ReportingPeriod option = (ReportingPeriod) ColumnViewerSorter.SortingContext.getColumnOption(); - Double v1 = valueProvider.apply(o1, option).getDistance(); - Double v2 = valueProvider.apply(o2, option).getDistance(); + var ath1 = valueProvider.apply(o1, option); + Double v1 = ath1 == null ? null : ath1.getDistance(); + var ath2 = valueProvider.apply(o2, option); + Double v2 = ath2 == null ? null : ath2.getDistance(); if (v1 == null && v2 == null) return 0;