From b2f8450db8dfbc05724624f93d9ec5e65f0b7e54 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 19 Aug 2009 17:10:18 -0700 Subject: fix [2063336] Surface.lockSurface throws IllegalArgumentException when out of memory --- libs/surfaceflinger/LayerBitmap.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libs/surfaceflinger/LayerBitmap.cpp') 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; -- cgit v1.2.3-59-g8ed1b