summaryrefslogtreecommitdiffstats
path: root/libs/ui/GraphicBuffer.cpp
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-08-13 12:06:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-13 12:06:31 -0700
commit771ed8d71be8c851991164cd10fcfbf2431df86d (patch)
treece345ce77679e144a5cdd0484b3c8e6b48daa90b /libs/ui/GraphicBuffer.cpp
parent6f23562e0c112bc5c6159c745d8af755cc530d77 (diff)
parentfc43e16a5693bca0edfc82c650fb606971e47138 (diff)
downloadframeworks_native-771ed8d71be8c851991164cd10fcfbf2431df86d.zip
frameworks_native-771ed8d71be8c851991164cd10fcfbf2431df86d.tar.gz
frameworks_native-771ed8d71be8c851991164cd10fcfbf2431df86d.tar.bz2
am fc43e16a: Merge "Graphics:Add error check when create GraphicBuffer"
* commit 'fc43e16a5693bca0edfc82c650fb606971e47138': Graphics:Add error check when create GraphicBuffer
Diffstat (limited to 'libs/ui/GraphicBuffer.cpp')
-rw-r--r--libs/ui/GraphicBuffer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 0ecd3d9..96a7188 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -282,6 +282,8 @@ status_t GraphicBuffer::unflatten(
if (handle != 0) {
status_t err = mBufferMapper.registerBuffer(handle);
if (err != NO_ERROR) {
+ width = height = stride = format = usage = 0;
+ handle = NULL;
ALOGE("unflatten: registerBuffer failed: %s (%d)",
strerror(-err), err);
return err;