mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Avoid NPE when underlying result point is null, for some reason
This commit is contained in:
parent
81963c8725
commit
e715fec42a
|
@ -160,7 +160,9 @@ public final class GenericMultipleBarcodeReader implements MultipleBarcodeReader
|
|||
ResultPoint[] newResultPoints = new ResultPoint[oldResultPoints.length];
|
||||
for (int i = 0; i < oldResultPoints.length; i++) {
|
||||
ResultPoint oldPoint = oldResultPoints[i];
|
||||
newResultPoints[i] = new ResultPoint(oldPoint.getX() + xOffset, oldPoint.getY() + yOffset);
|
||||
if (oldPoint != null) {
|
||||
newResultPoints[i] = new ResultPoint(oldPoint.getX() + xOffset, oldPoint.getY() + yOffset);
|
||||
}
|
||||
}
|
||||
Result newResult = new Result(result.getText(), result.getRawBytes(), newResultPoints, result.getBarcodeFormat());
|
||||
newResult.putAllMetadata(result.getResultMetadata());
|
||||
|
|
Loading…
Reference in a new issue