Skip to content

Commit

Permalink
Fix crash when switching from analog to can type in the middle of tra…
Browse files Browse the repository at this point in the history
…nsmission
  • Loading branch information
sedovmo committed Nov 29, 2024
1 parent 66b3c81 commit b5b9fcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions asam_cmp_capture_module/src/stream_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ void StreamFb::processCanPacket(const DataPacketPtr& packet)
const size_t sampleCount = packet.getSampleCount();

uint64_t* rawTimeBuffer = reinterpret_cast<uint64_t*>(packet.getDomainPacket().getRawData());
if (rawTimeBuffer == nullptr)
return;

RatioPtr timeResolution = packet.getDomainPacket().getDataDescriptor().getTickResolution();
size_t timeScale = 1'000'000'000 / timeResolution.getDenominator();

Expand Down

0 comments on commit b5b9fcd

Please sign in to comment.