Skip to content

Commit

Permalink
do not segfault on empty xdf (with clock sync values)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesselVS authored Nov 5, 2024
1 parent 45dbf90 commit 8b5c92f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,10 @@ void Xdf::syncTimeStamps()
}
else
{
streams[k].info.first_timestamp = streams[k].time_stamps.front();
streams[k].info.last_timestamp = streams[k].time_stamps.back();
if (streams[k].time_stamps.size() > 0) {
streams[k].info.first_timestamp = streams[k].time_stamps.front();
streams[k].info.last_timestamp = streams[k].time_stamps.back();
}
}
}
}
Expand Down

0 comments on commit 8b5c92f

Please sign in to comment.