blob: 7606db7e646c457599dced183111ccff839c695f [file] [log] [blame]
Jackeagle0cc335a2018-10-19 00:06:49 -04001From 962f7af622371eb8c0a170764facf92d9e1ddd74 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
Jackeagle0cc335a2018-10-19 00:06:49 -04004Subject: [PATCH 5/5] 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
Jackeagle0cc335a2018-10-19 00:06:49 -040012index e04b359..178285d 100644
Jon West013ef582018-08-21 20:45:26 -040013--- a/services/camera/libcameraservice/CameraService.cpp
14+++ b/services/camera/libcameraservice/CameraService.cpp
15@@ -243,7 +243,7 @@ void CameraService::addStates(const String8 id) {
16 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--
252.7.4
26