diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2014-11-20 13:34:36 -0800 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2014-11-20 13:34:36 -0800 |
commit | 5fc9d902510ccd04db80e0bc6aa679a4317a51b2 (patch) | |
tree | 7cc5cb5e5b3b62fef7cd5392ab35f81731ec9853 /camera | |
parent | 18899808001ddaea13fa4c5277502c96351f69a5 (diff) | |
download | frameworks_av-5fc9d902510ccd04db80e0bc6aa679a4317a51b2.zip frameworks_av-5fc9d902510ccd04db80e0bc6aa679a4317a51b2.tar.gz frameworks_av-5fc9d902510ccd04db80e0bc6aa679a4317a51b2.tar.bz2 |
Camera2: Fix CameraParameters parse segfault.
Bug: 18331142
Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
Diffstat (limited to 'camera')
-rw-r--r-- | camera/CameraParameters.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 25d632d..e5e4e90 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -488,6 +488,11 @@ void CameraParameters::getSupportedPreviewFormats(Vector<int>& formats) const { const char* supportedPreviewFormats = get(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS); + if (supportedPreviewFormats == NULL) { + ALOGW("%s: No supported preview formats.", __FUNCTION__); + return; + } + String8 fmtStr(supportedPreviewFormats); char* prevFmts = fmtStr.lockBuffer(fmtStr.size()); |