diff --git a/src/cachesim/chartlinemarker.cpp b/src/cachesim/chartlinemarker.cpp index 16af4c29..99917cd7 100644 --- a/src/cachesim/chartlinemarker.cpp +++ b/src/cachesim/chartlinemarker.cpp @@ -58,6 +58,9 @@ void ChartLineMarker::move(const QPointF ¢er) { // Note: we assume that the points are in a sorted order! const auto &points = m_series->points(); + if (points.size() == 0) { + return; + } const QPointF chartPos = m_chart->mapToValue(center); auto iter = std::lower_bound(points.begin(), points.end(), chartPos.x(),