Merge "camera3: Don't crash when taking a still capture with ZSL disabled" into jb-mr2-dev
diff --git a/services/camera/libcameraservice/camera2/ZslProcessor3.cpp b/services/camera/libcameraservice/camera2/ZslProcessor3.cpp
index 88bcefb..be1ffeb 100644
--- a/services/camera/libcameraservice/camera2/ZslProcessor3.cpp
+++ b/services/camera/libcameraservice/camera2/ZslProcessor3.cpp
@@ -305,7 +305,10 @@
}
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 {