Merge "Only convert valid SharedMemInfo"

This commit is contained in:
Peng Xu 2017-05-05 17:57:31 +00:00 committed by Android (Google) Code Review
commit 74247f83da

View file

@ -374,6 +374,10 @@ bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *
return false;
}
if (memIn.memoryHandle == nullptr) {
return false;
}
memOut->size = memIn.size;
memOut->handle = memIn.memoryHandle;
return true;