Merge "Only convert valid SharedMemInfo"
This commit is contained in:
commit
74247f83da
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue