diff options
author | Romain Guy <romainguy@google.com> | 2010-11-09 16:41:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-09 16:41:07 -0800 |
commit | 21c1114dad3a778992479ec8ef514e412a7b2646 (patch) | |
tree | 2aaedb0903f6626951ae22e2592a23d7f5e127e1 /libs/hwui | |
parent | c184a0b9be120964a9e00266541aea481e0caf13 (diff) | |
parent | f70a7e34953438dd70573dbb6fd3dd34a1bce831 (diff) | |
download | frameworks_base-21c1114dad3a778992479ec8ef514e412a7b2646.zip frameworks_base-21c1114dad3a778992479ec8ef514e412a7b2646.tar.gz frameworks_base-21c1114dad3a778992479ec8ef514e412a7b2646.tar.bz2 |
Merge "Fix possible crash when texture is NULL in the drop shadow cache."
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/TextDropShadowCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp index 9d54277..2f7c7be 100644 --- a/libs/hwui/TextDropShadowCache.cpp +++ b/libs/hwui/TextDropShadowCache.cpp @@ -74,10 +74,10 @@ void TextDropShadowCache::setMaxSize(uint32_t maxSize) { /////////////////////////////////////////////////////////////////////////////// void TextDropShadowCache::operator()(ShadowText& text, ShadowTexture*& texture) { - const uint32_t size = texture->width * texture->height; - mSize -= size; - if (texture) { + const uint32_t size = texture->width * texture->height; + mSize -= size; + glDeleteTextures(1, &texture->id); delete texture; } |