From 344cc5b36be641d85886766983779ead192b93ba Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Wed, 18 Aug 2021 18:46:28 -0400 Subject: [PATCH] Update canframemodel.cpp Fix normalize timing when there are no frames (fix suggested by @joee-co) --- canframemodel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/canframemodel.cpp b/canframemodel.cpp index baebc78..cf9eb93 100644 --- a/canframemodel.cpp +++ b/canframemodel.cpp @@ -133,7 +133,11 @@ void CANFrameModel::setTimeFormat(QString format) void CANFrameModel::normalizeTiming() { mutex.lock(); - if (frames.count() == 0) return; + if (frames.count() == 0) + { + mutex.unlock(); + return; + } timeOffset = frames[0].timeStamp().microSeconds(); qint64 prevStamp = 0;