commit | ef923fcfd3db9ca1d7df48273cf9a6258aaf15c2 | [log] [tgz] |
---|---|---|
author | Jesse Hall <jessehall@google.com> | Mon May 05 22:45:49 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon May 05 22:45:50 2014 +0000 |
tree | 179dbb11b8272216a2212a10d58ee12a42602c8f | |
parent | 70278fbfe012c1fce3e63a41ffb9feaf1e53a64a [diff] | |
parent | e2d1157381b863a94ccb36a1c6d70cad47e79c1a [diff] |
Merge "fix GraphicBuffer::flatten crash issue when handle is null"
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 96a7188..c4e4efa 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp
@@ -235,8 +235,10 @@ 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; }