diff options
Diffstat (limited to 'third_party/gif')
-rw-r--r-- | third_party/gif/SkGifImageReader.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/third_party/gif/SkGifImageReader.h b/third_party/gif/SkGifImageReader.h index 0b89b04818..0ba767ee89 100644 --- a/third_party/gif/SkGifImageReader.h +++ b/third_party/gif/SkGifImageReader.h @@ -321,11 +321,9 @@ public: int imagesCount() const { - // Report the first frame immediately, so the parser can stop when it - // sees the size on a SizeQuery. const size_t frames = m_frames.size(); - if (frames <= 1) { - return static_cast<int>(frames); + if (!frames) { + return 0; } // This avoids counting an empty frame when the file is truncated (or |