commit | 44f120fa169cb3131ec853c638ea9c88a9b33b97 | [log] [tgz] |
---|---|---|
author | Igor Murashkin <iam@google.com> | Tue Oct 09 14:45:37 2012 -0700 |
committer | Igor Murashkin <iam@google.com> | Tue Oct 09 14:45:37 2012 -0700 |
tree | b3eb3d0ef6d5eb1b04687aab10fc99c7ae9bb111 | |
parent | 3d84d38e7ac02b47d17f4bb272f18f8b0e873104 [diff] [blame] |
Camera: Clear Hardware device pointer when initialization fails When disconnecting, don't try to call device functions if the initialization fails since this can lead to internal HAL segfaults. Bug: 7317107 Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
diff --git a/services/camera/libcameraservice/CameraClient.cpp b/services/camera/libcameraservice/CameraClient.cpp index 5b59ef9..7e199fa 100644 --- a/services/camera/libcameraservice/CameraClient.cpp +++ b/services/camera/libcameraservice/CameraClient.cpp
@@ -73,6 +73,7 @@ if (res != OK) { ALOGE("%s: Camera %d: unable to initialize device: %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); + mHardware.clear(); return NO_INIT; }