OSDN Git Service

camera3: Don't crash when taking a still capture with ZSL disabled
authorIgor Murashkin <iam@google.com>
Thu, 2 May 2013 18:53:00 +0000 (11:53 -0700)
committerIgor Murashkin <iam@google.com>
Thu, 2 May 2013 21:04:41 +0000 (14:04 -0700)
Bug: 8790212
Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083

services/camera/libcameraservice/camera2/ZslProcessor3.cpp

index 88bcefb..be1ffeb 100644 (file)
@@ -305,7 +305,10 @@ status_t ZslProcessor3::clearZslQueue() {
 }
 
 status_t ZslProcessor3::clearZslQueueLocked() {
-    return mZslStream->clearInputRingBuffer();
+    if (mZslStream != 0) {
+        return mZslStream->clearInputRingBuffer();
+    }
+    return OK;
 }
 
 void ZslProcessor3::dump(int fd, const Vector<String16>& /*args*/) const {