Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1293bb4 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by android-build-merger
Browse files

Merge "libcameraservice: Fix nullptr crash when no client."

am: 4fbcb985

* commit '4fbcb985':
  libcameraservice: Fix nullptr crash when no client.
parents 1f410f44 4fbcb985
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -314,9 +314,11 @@ void CameraService::onDeviceStatusChanged(camera_device_status_t cameraId,
            clientToDisconnect = removeClientLocked(id);

            // Notify the client of disconnection
            if (clientToDisconnect != nullptr) {
                clientToDisconnect->notifyError(ICameraDeviceCallbacks::ERROR_CAMERA_DISCONNECTED,
                        CaptureResultExtras{});
            }
        }

        ALOGI("%s: Client for camera ID %s evicted due to device status change from HAL",
                __FUNCTION__, id.string());