mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Another protection against early view calls before camera init (issue 1254)
git-svn-id: https://zxing.googlecode.com/svn/trunk@2274 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
9a94f713db
commit
3926c96fc1
|
@ -178,6 +178,10 @@ public final class CameraManager {
|
|||
return null;
|
||||
}
|
||||
Point screenResolution = configManager.getScreenResolution();
|
||||
if (screenResolution == null) {
|
||||
// Called early, before init even finished
|
||||
return null;
|
||||
}
|
||||
int width = screenResolution.x * 3 / 4;
|
||||
if (width < MIN_FRAME_WIDTH) {
|
||||
width = MIN_FRAME_WIDTH;
|
||||
|
|
Loading…
Reference in a new issue