lineage_patches_unified/patches/platform_frameworks_av/0004-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
Andy CrossGate Yan 79b5b414a7 Regenerate patches
frameworks/base got too messy, time to clean it up
2021-02-14 10:41:04 +00:00

28 lines
1.1 KiB
Diff

From 1fe92753746f4410f5ac97abcef083276940cfee Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 19 Aug 2018 23:05:26 +0200
Subject: [PATCH 04/17] We might not have a mFlashlight at this state, but
that's ok
Change-Id: I0ae65c0be4931b4e3cbda2d0cc64acc4f5018a73
---
services/camera/libcameraservice/CameraService.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 077e3b238..bbfd90a28 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -299,7 +299,7 @@ void CameraService::addStates(const String8 id) {
isPublicallyHiddenSecureCamera));
}
- if (mFlashlight->hasFlashUnit(id)) {
+ if (mFlashlight != nullptr && mFlashlight->hasFlashUnit(id)) {
Mutex::Autolock al(mTorchStatusMutex);
mTorchStatusMap.add(id, TorchModeStatus::AVAILABLE_OFF);
--
2.25.1