mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Small additional error check in decoder
git-svn-id: https://zxing.googlecode.com/svn/trunk@674 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
034b6ef1f2
commit
56644b1af2
|
@ -129,6 +129,10 @@ public final class Detector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (maybeTopLeft == null || bottomLeft == null || maybeBottomRight == null) {
|
||||||
|
throw new ReaderException("Could not find three corners");
|
||||||
|
}
|
||||||
|
|
||||||
// Bottom left is correct but top left and bottom right might be switched
|
// Bottom left is correct but top left and bottom right might be switched
|
||||||
ResultPoint[] corners = new ResultPoint[] { maybeTopLeft, bottomLeft, maybeBottomRight };
|
ResultPoint[] corners = new ResultPoint[] { maybeTopLeft, bottomLeft, maybeBottomRight };
|
||||||
// Use the dot product trick to sort them out
|
// Use the dot product trick to sort them out
|
||||||
|
|
Loading…
Reference in a new issue