Skip to content

Commit

Permalink
simple crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Oct 20, 2020
1 parent 13d20dd commit 50378e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SMBusAnalyzer.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit 50378e5

Please sign in to comment.