diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2014-11-21 17:55:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-21 17:55:13 +0000 |
commit | 6b6d8a79ef821541a7687ed924959369f73fc977 (patch) | |
tree | 1678ee92f9ee7e1f9c87498852c45a567c7c9122 /camera | |
parent | 2fd47f8cfe314dd9d01f401408b70ad8d443518b (diff) | |
parent | ffa3e71e47215b68fe4ae0b7a3f976db648d63d3 (diff) | |
download | frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.zip frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.tar.gz frameworks_av-6b6d8a79ef821541a7687ed924959369f73fc977.tar.bz2 |
am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev
* commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3':
Camera2: Fix CameraParameters parse segfault.
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()); |