diff options
| author | 2012-08-30 13:28:23 -0700 | |
|---|---|---|
| committer | 2012-08-30 18:38:11 -0700 | |
| commit | d69097f936d9780957a51ce77335ae409b32aaa3 (patch) | |
| tree | 784124e451db6e0294dc68435c388e0dc844a13c /libs/ui/GraphicBuffer.cpp | |
| parent | 5e5efde7874a9fab650fd4b724ceef46db850470 (diff) | |
libgui: add some error checks
This change adds a few error checks both in the framework and in some tests.
Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
Diffstat (limited to 'libs/ui/GraphicBuffer.cpp')
| -rw-r--r-- | libs/ui/GraphicBuffer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 57063e5246..b9cab85573 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -258,7 +258,12 @@ status_t GraphicBuffer::unflatten(void const* buffer, size_t size, mOwner = ownHandle; if (handle != 0) { - mBufferMapper.registerBuffer(handle); + status_t err = mBufferMapper.registerBuffer(handle); + if (err != NO_ERROR) { + ALOGE("unflatten: registerBuffer failed: %s (%d)", + strerror(-err), err); + return err; + } } return NO_ERROR; |