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

Commit ba1a5300 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

Change-Id: I25af16883f8b3e8e323e384a68509031c1bcf720
parents dfbaa685 bf432cce
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);
    {