blob: 742651295af739090fa550d063efe987a9aaa997 [file] [log] [blame]
Jon West013ef582018-08-21 20:45:26 -04001From ec657f31e92f4a58791a39025632f0350a7750db Mon Sep 17 00:00:00 2001
2From: Pierre-Hugues Husson <phh@phh.me>
3Date: Sun, 19 Aug 2018 23:05:26 +0200
4Subject: [PATCH 4/4] We might not have a mFlashlight at this state, but that's
5 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
12index edbafbc..222cfe4 100644
13--- 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