From 413938d209e6c838607b5eb024ad4f1f0f938495 Mon Sep 17 00:00:00 2001 From: Andriy Chepurnyy Date: Tue, 23 Oct 2012 13:46:16 +0300 Subject: CameraHAL : Fix crash if IPP not set by default Fix crash if IPP not set by default Change-Id: I329f3bf49fef2db2ec136e7755c27a01bcab373f Signed-off-by: Andriy Chepurnyy --- camera/CameraHal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'camera') diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index c37f57b..20914ce 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -440,7 +440,8 @@ int CameraHal::setParameters(const android::CameraParameters& params) if ((valstr = params.get(TICameraParameters::KEY_IPP)) != NULL) { if (isParameterValid(valstr,mCameraProperties->get(CameraProperties::SUPPORTED_IPP_MODES))) { - if (strcmp(valstr, mParameters.get(TICameraParameters::KEY_IPP))) { + if ((mParameters.get(TICameraParameters::KEY_IPP) == NULL) || + (strcmp(valstr, mParameters.get(TICameraParameters::KEY_IPP)))) { CAMHAL_LOGDB("IPP mode set %s", params.get(TICameraParameters::KEY_IPP)); mParameters.set(TICameraParameters::KEY_IPP, valstr); restartPreviewRequired = true; -- cgit v1.1