Update canframemodel.cpp

Fix normalize timing when there are no frames (fix suggested by @joee-co)
This commit is contained in:
Collin Kidder
2021-08-18 18:46:28 -04:00
committed by GitHub
parent b12c4d4be4
commit 344cc5b36b
+5 -1
View File
@@ -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;