Skip to content

Commit 5bcb8e9

Browse files
committed
Fix crash when switching from analog to can type in the middle of transmission
1 parent 66b3c81 commit 5bcb8e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

asam_cmp_capture_module/src/stream_fb.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ void StreamFb::processCanPacket(const DataPacketPtr& packet)
334334
const size_t sampleCount = packet.getSampleCount();
335335

336336
uint64_t* rawTimeBuffer = reinterpret_cast<uint64_t*>(packet.getDomainPacket().getRawData());
337+
if (rawTimeBuffer == nullptr)
338+
return;
339+
337340
RatioPtr timeResolution = packet.getDomainPacket().getDataDescriptor().getTickResolution();
338341
size_t timeScale = 1'000'000'000 / timeResolution.getDenominator();
339342

0 commit comments

Comments
 (0)