From 2167310b01e6e75225672a720b74dcbdc367cc12 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 16 Dec 2023 09:28:25 +0700 Subject: [PATCH] Add an additional safeguard when the barcode decoder attempts to process a video frame --- src/core/barcodedecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/barcodedecoder.cpp b/src/core/barcodedecoder.cpp index 9a3a4e96d3..2b68279c3f 100644 --- a/src/core/barcodedecoder.cpp +++ b/src/core/barcodedecoder.cpp @@ -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();