commit | 74d8acd7fcd5f245feb28618a003b1ac2f762a7e | [log] [tgz] |
---|---|---|
author | Andy McFadden <fadden@android.com> | Tue Mar 18 15:20:23 2014 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue Mar 18 15:20:24 2014 +0000 |
tree | 7b2d5cb10f48a02859d5ca6ec8ab30062c7dd9cd | |
parent | 8bf3b1a4964188d4ad0b96cd12174f2ba5c1eddd [diff] | |
parent | bc96e4714f4cc1ae598f122b3b9f7998c09fe674 [diff] |
Merge "Added null check"
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; }