mirror of https://github.com/status-im/qzxing.git
add extra check in QRFinderPatternFinder to avoid segmentation. Must be investigated if it is work-around that hides issue or if it is a valid check. #164
This commit is contained in:
parent
ee750faad0
commit
cf3391027b
|
@ -512,11 +512,16 @@ Ref<FinderPatternInfo> FinderPatternFinder::find(DecodeHints const& hints) {
|
|||
}
|
||||
}
|
||||
|
||||
if(this->possibleCenters_.size() < 3) {
|
||||
if(possibleCenters_.size() < 3) {
|
||||
throw zxing::ReaderException("no possible centers found");
|
||||
}
|
||||
|
||||
vector< Ref <FinderPattern> > patternInfo = selectBestPatterns();
|
||||
|
||||
if(patternInfo.size() != 3) {
|
||||
throw zxing::ReaderException("no pattern info found");
|
||||
}
|
||||
|
||||
vector< Ref <ResultPoint> > patternInfoResPoints;
|
||||
|
||||
for(size_t i=0; i<patternInfo.size(); i++)
|
||||
|
|
Loading…
Reference in New Issue