summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
index f1a082f75..fd107e446 100755
--- a/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
+++ b/src/org/codeaurora/snapcam/filter/ClearSightImageProcessor.java
@@ -903,6 +903,12 @@ public class ClearSightImageProcessor {
mImageEncodeHandler.obtainMessage(MSG_START_CAPTURE).sendToTarget();
short encodeRequest = 0;
+ /* In same case, timeout will reset ClearSightNativeEngine object, so fields
+ in the object is not initial, need to return and skip process.
+ */
+ if (ClearSightNativeEngine.getInstance().getReferenceImage(true) == null) {
+ return;
+ }
long csTs = ClearSightNativeEngine.getInstance().getReferenceImage(true).getTimestamp();
CaptureRequest.Builder csRequest = createEncodeReprocRequest(
ClearSightNativeEngine.getInstance().getReferenceResult(true), CAM_TYPE_BAYER);