diff options
| author | Mathias Agopian <mathias@google.com> | 2009-07-09 18:16:43 -0700 |
|---|---|---|
| committer | Mathias Agopian <mathias@google.com> | 2009-07-09 18:16:43 -0700 |
| commit | 4d2dbebf3d08209f751585d8cc367369e2f6e32f (patch) | |
| tree | 1733191a1ce6268812d85f0423eb60f39f06ce13 /libs/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 46e28db8818332e3cda4cc410cc89a1ed7ce4db6 (diff) | |
| download | frameworks_base-4d2dbebf3d08209f751585d8cc367369e2f6e32f.zip frameworks_base-4d2dbebf3d08209f751585d8cc367369e2f6e32f.tar.gz frameworks_base-4d2dbebf3d08209f751585d8cc367369e2f6e32f.tar.bz2 | |
fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
Diffstat (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | libs/surfaceflinger/SurfaceFlinger.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index ef4a8ea..fb25663 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1236,6 +1236,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid, { LayerBaseClient* layer = 0; sp<LayerBaseClient::Surface> surfaceHandle; + + if (int32_t(w|h) < 0) { + LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)", + int(w), int(h)); + return surfaceHandle; + } + Mutex::Autolock _l(mStateLock); Client* const c = mClientsMap.valueFor(clientId); if (UNLIKELY(!c)) { |
