am 424b093a: am ef923fcf: Merge "fix GraphicBuffer::flatten crash issue when handle is null"

* commit '424b093a58c9f428081da991afa347183bf07847':
  fix GraphicBuffer::flatten crash issue when handle is null
This commit is contained in:
Jesse Hall 2014-05-05 22:51:27 +00:00 committed by Android Git Automerger
commit 9fdfa60aaf

View File

@ -235,8 +235,10 @@ status_t GraphicBuffer::flatten(void*& buffer, size_t& size, int*& fds, size_t&
buffer = reinterpret_cast<void*>(static_cast<int*>(buffer) + sizeNeeded); buffer = reinterpret_cast<void*>(static_cast<int*>(buffer) + sizeNeeded);
size -= sizeNeeded; size -= sizeNeeded;
fds += handle->numFds; if (handle) {
count -= handle->numFds; fds += handle->numFds;
count -= handle->numFds;
}
return NO_ERROR; return NO_ERROR;
} }