Skip to content

Commit

Permalink
Fix crash in plotting code
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Apr 1, 2023
1 parent b154eb8 commit 00a8fb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ void MainWindow::update_graphs() {
QVector<QPointF> in_current = in_data_.get_current_points();
QVector<QPointF> out_current = out_data_.get_current_points();

if (in_current.isEmpty() || out_current.isEmpty()) {
return;
}

auto xMax = std::max(in_current.back().x(), out_current.back().x());
auto xMin = xMax - out_data_.size_milliseconds();

Expand Down

0 comments on commit 00a8fb2

Please sign in to comment.