Skip to content

Commit

Permalink
Fix crash when hovering over the cache statistics chart (#324)
Browse files Browse the repository at this point in the history
Reported by @margheritarufi
  • Loading branch information
raccog authored Dec 6, 2023
1 parent 357f796 commit 42ac2d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cachesim/chartlinemarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ void ChartLineMarker::move(const QPointF &center) {

// 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(),
Expand Down

0 comments on commit 42ac2d4

Please sign in to comment.