summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-05-02 11:53:00 -0700
committerIgor Murashkin <iam@google.com>2013-05-02 14:04:41 -0700
commit61675c0a7b5d88d5f525b1a1926fab6a7b2c7904 (patch)
treed184ee5c49fd92306b1d9f528c9361a45d327aa5 /services
parent688492164e7d92618a1409b567f884bcbd9a5d02 (diff)
downloadframeworks_av-61675c0a7b5d88d5f525b1a1926fab6a7b2c7904.zip
frameworks_av-61675c0a7b5d88d5f525b1a1926fab6a7b2c7904.tar.gz
frameworks_av-61675c0a7b5d88d5f525b1a1926fab6a7b2c7904.tar.bz2
camera3: Don't crash when taking a still capture with ZSL disabled
Bug: 8790212 Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/camera2/ZslProcessor3.cpp5
1 files changed, 4 insertions, 1 deletions
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::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 {