Another bug fix to go with Issue 1044 -- this one only cropped up on my tablet though

git-svn-id: https://zxing.googlecode.com/svn/trunk@2014 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-11-04 16:27:14 +00:00
parent c3659d2b94
commit e7781ae3d8

View file

@ -245,7 +245,11 @@ public final class CameraManager {
*/
public Rect getFramingRectInPreview() {
if (framingRectInPreview == null) {
Rect rect = new Rect(getFramingRect());
Rect framingRect = getFramingRect();
if (framingRect == null) {
return null;
}
Rect rect = new Rect(framingRect);
Point cameraResolution = configManager.getCameraResolution();
Point screenResolution = configManager.getScreenResolution();
rect.left = rect.left * cameraResolution.x / screenResolution.x;