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

Commit 32a78e18 authored by George Burgess IV's avatar George Burgess IV Committed by android-build-merger
Browse files

Merge "camera: fix two potential null pointer uses" am: bf432cce

am: ba1a5300

Change-Id: Idde46fe6aeb8e747db3f703783e70fedcec18da7
parents aaa72ec0 ba1a5300
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -397,9 +397,11 @@ void CameraDevice::sPutMemory(camera_memory_t *data) {
    CameraDevice* device = mem->handle.mDevice;
    if (device == nullptr) {
        ALOGE("%s: camera HAL return memory for a null device!", __FUNCTION__);
        return;
    }
    if (device->mDeviceCallback == nullptr) {
        ALOGE("%s: camera HAL return memory while camera is not opened!", __FUNCTION__);
        return;
    }
    device->mDeviceCallback->unregisterMemory(mem->handle.mId);
    {