Avoid possible NPE when there is no bounding box?

git-svn-id: https://zxing.googlecode.com/svn/trunk@2801 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-05-18 12:52:38 +00:00
parent 5214bf1840
commit 2561cb3ce6

View file

@ -72,7 +72,7 @@ public final class PDF417ScanningDecoder {
if (detectionResult == null) {
throw NotFoundException.getNotFoundInstance();
}
if (i == 0 &&
if (i == 0 && detectionResult.getBoundingBox() != null &&
(detectionResult.getBoundingBox().getMinY() < boundingBox.getMinY() || detectionResult.getBoundingBox()
.getMaxY() > boundingBox.getMaxY())) {
boundingBox = detectionResult.getBoundingBox();