summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-11-09 16:41:07 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-09 16:41:07 -0800
commit21c1114dad3a778992479ec8ef514e412a7b2646 (patch)
tree2aaedb0903f6626951ae22e2592a23d7f5e127e1 /libs/hwui
parentc184a0b9be120964a9e00266541aea481e0caf13 (diff)
parentf70a7e34953438dd70573dbb6fd3dd34a1bce831 (diff)
downloadframeworks_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.cpp6
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;
}