Merge "Fix possible crash when texture is NULL in the drop shadow cache."
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user