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

Commit 4fbcb985 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Gerrit Code Review
Browse files

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

parents 8be95ca8 056c93eb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -308,9 +308,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());