From 50378e53f03ae111d5d1dcda848e99e1656d242a Mon Sep 17 00:00:00 2001 From: Marcus10110 Date: Mon, 19 Oct 2020 18:57:01 -0700 Subject: [PATCH] simple crash fix --- src/SMBusAnalyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMBusAnalyzer.cpp b/src/SMBusAnalyzer.cpp index 77bd5e4..7c688b9 100644 --- a/src/SMBusAnalyzer.cpp +++ b/src/SMBusAnalyzer.cpp @@ -247,7 +247,7 @@ void SMBusAnalyzer::WorkerThread() { if( byte.IsComplete() ) { - if( packet.chunks.back().size() == 1 ) // if this is the first byte of the packet + if( !packet.chunks.empty() && packet.chunks.back().size() == 1 ) // if this is the first byte of the packet mResults->AddFrame( byte.ToAddrFrame( NULL ) ); else mResults->AddFrame( byte.ToFrame() );