blob: 038b89da3b5b2325abf078f974c4ca492693d5a0 [file] [log] [blame]
Jon Westd3f9c782019-04-17 20:45:29 -04001From 1a48acacf69713582aba409e4b710a91921e78c5 Mon Sep 17 00:00:00 2001
Jon West013ef582018-08-21 20:45:26 -04002From: Pierre-Hugues Husson <phh@phh.me>
3Date: Sun, 19 Aug 2018 23:05:26 +0200
Jon Westd3f9c782019-04-17 20:45:29 -04004Subject: [PATCH 3/6] We might not have a mFlashlight at this state, but that's
Jon West013ef582018-08-21 20:45:26 -04005 ok
6
7---
8 services/camera/libcameraservice/CameraService.cpp | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
Jon Westd3f9c782019-04-17 20:45:29 -040012index ba69bddaf..607e2d23b 100644
Jon West013ef582018-08-21 20:45:26 -040013--- a/services/camera/libcameraservice/CameraService.cpp
14+++ b/services/camera/libcameraservice/CameraService.cpp
Jackeagled3ba2282018-11-17 20:49:22 -070015@@ -258,7 +258,7 @@ void CameraService::addStates(const String8 id) {
Jon West013ef582018-08-21 20:45:26 -040016 conflicting));
17 }
18
19- if (mFlashlight->hasFlashUnit(id)) {
20+ if (mFlashlight != nullptr && mFlashlight->hasFlashUnit(id)) {
21 Mutex::Autolock al(mTorchStatusMutex);
22 mTorchStatusMap.add(id, TorchModeStatus::AVAILABLE_OFF);
23 }
24--
Jackeagled3ba2282018-11-17 20:49:22 -0700252.17.1
Jon West013ef582018-08-21 20:45:26 -040026