Skip to content

Commit

Permalink
Add an additional safeguard when the barcode decoder attempts to proc…
Browse files Browse the repository at this point in the history
…ess a video frame
  • Loading branch information
nirvn committed Dec 17, 2023
1 parent 39e5e18 commit 2167310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/barcodedecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void BarcodeDecoder::setVideoSink( QVideoSink *sink )

void BarcodeDecoder::decodeVideoFrame( const QVideoFrame &frame )
{
if ( mDecodingThread )
if ( mDecodingThread || !frame.isValid() )
return;

QImage image = frame.toImage();
Expand Down

1 comment on commit 2167310

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.