Merge "Camera: fix null pointer dereference" into qt-dev
am: dc7de27113
Change-Id: Ifcd0da978fe11f873e07310ef2513b87ba3415a8
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user