More for Issue 1044 -- avoid another possible NPE though I don't think the underlyling issue has been found yet

git-svn-id: https://zxing.googlecode.com/svn/trunk@2010 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-11-02 20:02:32 +00:00
parent c79fb8474b
commit 86034a4442

View file

@ -108,7 +108,10 @@ public final class CaptureActivityHandler extends Handler {
public void quitSynchronously() {
state = State.DONE;
CameraManager.get().stopPreview();
CameraManager cameraManager = CameraManager.get();
if (cameraManager != null) {
cameraManager.stopPreview();
}
Message quit = Message.obtain(decodeThread.getHandler(), R.id.quit);
quit.sendToTarget();
try {