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

Commit 67dc3a64 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by android-build-merger
Browse files

Merge "Camera: fix null pointer dereference" into qt-dev

am: dc7de271

Change-Id: Ifcd0da978fe11f873e07310ef2513b87ba3415a8
parents fb856af4 dc7de271
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -256,6 +256,10 @@ void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int
        ssize_t offset;
        size_t size;
        sp<IMemoryHeap> heap = dataPtr->getMemory(&offset, &size);
        if (heap == NULL) {
            ALOGV("copyAndPost: skipping null memory callback!");
            return;
        }
        ALOGV("copyAndPost: off=%zd, size=%zu", offset, size);
        uint8_t *heapBase = (uint8_t*)heap->base();