summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2014-11-21 17:43:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-21 17:43:57 +0000
commitbc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf (patch)
treea061c36a4392000a1d7d5a9b4db5de0ec63e644f /camera
parent3a8d7d1064a665a8a348710c7d27b31642f7f624 (diff)
parent5fc9d902510ccd04db80e0bc6aa679a4317a51b2 (diff)
downloadframeworks_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.cpp5
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());