Merge "Fix possible crash when texture is NULL in the drop shadow cache."

This commit is contained in:
Romain Guy
2010-11-09 16:41:07 -08:00
committed by Android (Google) Code Review

View File

@@ -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;
}