diff options
| author | 2009-07-09 20:05:11 -0700 | |
|---|---|---|
| committer | 2009-07-09 20:05:11 -0700 | |
| commit | 4860b74b473e0043004530c4c4de9f8971af95c6 (patch) | |
| tree | c7e1216173934234080743f721cecdcb1a47be94 /libs/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 3943342796ccde842b0c4484dc889de75b8cf6ae (diff) | |
| parent | 6e2d6483fe14362187c78c91dc03024fbb31d431 (diff) | |
am 4d2dbebf: fix for [1885684] E/SurfaceFlinger( 60): not enough memory for layer bitmap size=4294938624
Merge commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f'
* commit '4d2dbebf3d08209f751585d8cc367369e2f6e32f':
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 5ac1cfd932..7a7574f577 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1212,6 +1212,13 @@ sp<ISurface> SurfaceFlinger::createSurface(ClientID clientId, int pid, { sp<LayerBaseClient> layer; 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); sp<Client> client = mClientsMap.valueFor(clientId); if (UNLIKELY(client == 0)) { |