diff options
author | 2017-07-26 01:35:01 +0000 | |
---|---|---|
committer | 2017-07-26 01:35:01 +0000 | |
commit | b2121f1a73836da80d6d0fa17cb84bc5b8cdede7 (patch) | |
tree | da4e3a1864e8f0ddf5c588e5d5ee3174a0620731 | |
parent | dd25d785530735ab38427ffd1c71e49ae2f3c512 (diff) | |
parent | dde7dd3386f772f1b8ea03e8e39283a06336a175 (diff) |
Merge "Silence a memory leak warning from the static analyzer" am: f44ebf5fcb am: 20674ac1eb am: b759691046 am: 89c254612e
am: dde7dd3386
Change-Id: Ib38108bc100ce29c765f9f0ef0697212c0109c32
-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 01582ce8f007..63bf7bc443e0 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; } |