summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDaniel Levin <dendy@ti.com>2012-07-25 16:23:42 -0500
committerDaniel Levin <dendy@ti.com>2012-07-25 16:23:42 -0500
commit1ad7b09428a8113dfeccec2ee2f83e34623aa945 (patch)
tree7f7da3e01b50c56ae5ecbfb8bed0e2d798d62295 /camera
parent39d50eecaa890262e491ad27cceda3f7e67deaed (diff)
parent74c32da819f529a359aad7d0a16e28858d7009a6 (diff)
downloadhardware_ti_omap4-1ad7b09428a8113dfeccec2ee2f83e34623aa945.zip
hardware_ti_omap4-1ad7b09428a8113dfeccec2ee2f83e34623aa945.tar.gz
hardware_ti_omap4-1ad7b09428a8113dfeccec2ee2f83e34623aa945.tar.bz2
Merge "CameraHal: Avoid possible segfaults in 'setExtraData()'" into jb-migration
Change-Id: I24d14046f547662ad3f7743a05908919e5c5eee2 Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 2b7ef30..a83707d 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -3973,7 +3973,8 @@ status_t OMXCameraAdapter::setExtraData(bool enable, OMX_U32 nPortIndex, OMX_EXT
LOG_FUNCTION_NAME;
- if (OMX_StateInvalid == mComponentState) {
+ if ( ( OMX_StateInvalid == mComponentState ) ||
+ ( NULL == mCameraAdapterParameters.mHandleComp ) ) {
CAMHAL_LOGEA("OMX component is in invalid state");
return -EINVAL;
}