Chromium Code Reviews| Index: gm/animatedGif.cpp |
| diff --git a/gm/animatedGif.cpp b/gm/animatedGif.cpp |
| index 6f7f0ddd1b2fe02885240e091a52a704813d47c5..7b5f50c39528b2dd3bd49e89a80899283d08e17e 100644 |
| --- a/gm/animatedGif.cpp |
| +++ b/gm/animatedGif.cpp |
| @@ -129,7 +129,10 @@ private: |
| } |
| fFrame = 0; |
| - fFrameInfos = fCodec->getFrameInfo(); |
| + if (!fCodec->getFrameInfo(&fFrameInfos, nullptr)) { |
| + SkDebugf("%s is not animated", FLAGS_animatedGif[0]); |
| + return false; |
| + } |
| fTotalFrames = fFrameInfos.size(); |
| return true; |
| } |