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

Commit b70b9f65 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Verify SBackGroundColor before using it"

parents 7eb9f72a f75bde38
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);
    }