summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/LayerBitmap.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2009-08-19 17:10:18 -0700
committer Mathias Agopian <mathias@google.com> 2009-08-19 17:10:18 -0700
commitb2f8450db8dfbc05724624f93d9ec5e65f0b7e54 (patch)
treef3e8c8c15de695ac033283e37acb0999b7502c3f /libs/surfaceflinger/LayerBitmap.cpp
parent07782e079f4410090f87dca109e24e9436653654 (diff)
fix [2063336] Surface.lockSurface throws IllegalArgumentException when out of memory
Diffstat (limited to 'libs/surfaceflinger/LayerBitmap.cpp')
-rw-r--r--libs/surfaceflinger/LayerBitmap.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/surfaceflinger/LayerBitmap.cpp b/libs/surfaceflinger/LayerBitmap.cpp
index 5e74451d5f04..dd61e1a3f111 100644
--- a/libs/surfaceflinger/LayerBitmap.cpp
+++ b/libs/surfaceflinger/LayerBitmap.cpp
@@ -97,11 +97,9 @@ status_t Buffer::initSize(uint32_t w, uint32_t h, uint32_t reqUsage)
err = allocator.alloc(w, h, format, usage, &handle, &stride);
if (err == NO_ERROR) {
- if (err == NO_ERROR) {
- width = w;
- height = h;
- mVStride = 0;
- }
+ width = w;
+ height = h;
+ mVStride = 0;
}
return err;