diff --git a/src/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp b/src/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp index c90308f..42306ad 100644 --- a/src/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp +++ b/src/zxing/zxing/qrcode/detector/QRFinderPatternFinder.cpp @@ -512,11 +512,16 @@ Ref FinderPatternFinder::find(DecodeHints const& hints) { } } - if(this->possibleCenters_.size() < 3) { + if(possibleCenters_.size() < 3) { throw zxing::ReaderException("no possible centers found"); } vector< Ref > patternInfo = selectBestPatterns(); + + if(patternInfo.size() != 3) { + throw zxing::ReaderException("no pattern info found"); + } + vector< Ref > patternInfoResPoints; for(size_t i=0; i