Merge "Added null check"

This commit is contained in:
Andy McFadden 2014-03-18 15:20:23 +00:00 committed by Android (Google) Code Review
commit 74d8acd7fc

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);
size -= sizeNeeded;
fds += handle->numFds;
count -= handle->numFds;
if (handle) {
fds += handle->numFds;
count -= handle->numFds;
}
return NO_ERROR;
}