Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 1 | From e5c496ab9a64a05809a7149b047c8160395aff2b Mon Sep 17 00:00:00 2001 |
Jon West | 013ef58 | 2018-08-21 20:45:26 -0400 | [diff] [blame] | 2 | From: Pierre-Hugues Husson <phh@phh.me> |
| 3 | Date: Sun, 19 Aug 2018 23:05:26 +0200 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 4 | Subject: [PATCH 4/4] We might not have a mFlashlight at this state, but that's |
Jon West | 013ef58 | 2018-08-21 20:45:26 -0400 | [diff] [blame] | 5 | ok |
| 6 | |
| 7 | --- |
| 8 | services/camera/libcameraservice/CameraService.cpp | 2 +- |
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 12 | index b62d22080b..0f2c4cac70 100644 |
Jon West | 013ef58 | 2018-08-21 20:45:26 -0400 | [diff] [blame] | 13 | --- a/services/camera/libcameraservice/CameraService.cpp |
| 14 | +++ b/services/camera/libcameraservice/CameraService.cpp |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 15 | @@ -258,7 +258,7 @@ void CameraService::addStates(const String8 id) { |
Jon West | 013ef58 | 2018-08-21 20:45:26 -0400 | [diff] [blame] | 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 | -- |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 25 | 2.17.1 |
Jon West | 013ef58 | 2018-08-21 20:45:26 -0400 | [diff] [blame] | 26 | |