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

Commit f75bde38 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Verify SBackGroundColor before using it

Test: Ib76234d8a05732936ffd4218e350a8a4415702cf

Bug: 37662286
Change-Id: If6ebddbdb6cb34c9318936358cdc9c657717915a
parent 5b3d97a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -391,8 +391,8 @@ bool GIFMovie::onGetBitmap(SkBitmap* bm)
    }

    SkColor bgColor = SkPackARGB32(0, 0, 0, 0);
    if (gif->SColorMap != nullptr) {
        const GifColorType& col = gif->SColorMap->Colors[fGIF->SBackGroundColor];
    if (gif->SColorMap != nullptr && gif->SBackGroundColor < gif->SColorMap->ColorCount) {
        const GifColorType& col = gif->SColorMap->Colors[gif->SBackGroundColor];
        bgColor = SkColorSetARGB(0xFF, col.Red, col.Green, col.Blue);
    }