Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21c1114d authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

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

parents c184a0b9 f70a7e34
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -74,10 +74,10 @@ void TextDropShadowCache::setMaxSize(uint32_t maxSize) {
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////


void TextDropShadowCache::operator()(ShadowText& text, ShadowTexture*& texture) {
void TextDropShadowCache::operator()(ShadowText& text, ShadowTexture*& texture) {
    if (texture) {
        const uint32_t size = texture->width * texture->height;
        const uint32_t size = texture->width * texture->height;
        mSize -= size;
        mSize -= size;


    if (texture) {
        glDeleteTextures(1, &texture->id);
        glDeleteTextures(1, &texture->id);
        delete texture;
        delete texture;
    }
    }