diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2014-11-21 17:43:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-21 17:43:57 +0000 |
commit | bc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf (patch) | |
tree | a061c36a4392000a1d7d5a9b4db5de0ec63e644f /camera | |
parent | 3a8d7d1064a665a8a348710c7d27b31642f7f624 (diff) | |
parent | 5fc9d902510ccd04db80e0bc6aa679a4317a51b2 (diff) | |
download | frameworks_av-bc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf.zip frameworks_av-bc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf.tar.gz frameworks_av-bc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf.tar.bz2 |
Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev
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()); |