diff options
author | 2009-08-19 17:10:18 -0700 | |
---|---|---|
committer | 2009-08-19 17:10:18 -0700 | |
commit | 50517543d84446fc91fa65c60eda6d2e2724de10 (patch) | |
tree | ea98f93e9f3f4c4cb7803787a14fdcfadc985dd7 /libs/surfaceflinger/LayerBitmap.cpp | |
parent | 139c1dee4412b17c7d05528b4afc0dd8586d25b8 (diff) |
fix [2063336] Surface.lockSurface throws IllegalArgumentException when out of memory
Diffstat (limited to 'libs/surfaceflinger/LayerBitmap.cpp')
-rw-r--r-- | libs/surfaceflinger/LayerBitmap.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/surfaceflinger/LayerBitmap.cpp b/libs/surfaceflinger/LayerBitmap.cpp index 5e74451d5f..dd61e1a3f1 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; |