diff options
author | 2017-07-26 00:26:12 +0000 | |
---|---|---|
committer | 2017-07-26 00:26:12 +0000 | |
commit | 20674ac1eb677d9036f905c2abb4031b3d5ec57d (patch) | |
tree | 626bcc25de127dac349e4a50ec03e8dee29bf8db | |
parent | b7e104d0a3d7a007775701df5e4503091dcc4d98 (diff) | |
parent | f44ebf5fcba4dc5f7021a3b72a8f26b11ae23db2 (diff) |
Merge "Silence a memory leak warning from the static analyzer"
am: f44ebf5fcb
Change-Id: Ic0b97fb0689b4d322aa6ed25fe55ec192bff07a5
-rw-r--r-- | libs/hwui/TessellationCache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp index 91e7ac39af90..9adf0538203e 100644 --- a/libs/hwui/TessellationCache.cpp +++ b/libs/hwui/TessellationCache.cpp @@ -400,7 +400,9 @@ TessellationCache::Buffer* TessellationCache::getOrCreateBuffer( mProcessor = new TessellationProcessor(Caches::getInstance()); } mProcessor->add(task); - mCache.put(entry, buffer); + bool inserted = mCache.put(entry, buffer); + // Note to the static analyzer that this insert should always succeed. + LOG_ALWAYS_FATAL_IF(!inserted, "buffers shouldn't spontaneously appear in the cache"); } return buffer; } |