Index: Source/platform/image-decoders/ImageDecoder.cpp |
diff --git a/Source/platform/image-decoders/ImageDecoder.cpp b/Source/platform/image-decoders/ImageDecoder.cpp |
index 28c91edfb7aa4d5b0b506a1606a149939a21aad2..cb5774dffc510ff6718f93165df02db3011adc39 100644 |
--- a/Source/platform/image-decoders/ImageDecoder.cpp |
+++ b/Source/platform/image-decoders/ImageDecoder.cpp |
@@ -134,6 +134,10 @@ |
size_t ImageDecoder::clearCacheExceptFrame(size_t clearExceptFrame) |
{ |
+ // Don't clear if there are no frames or only one frame. |
+ if (m_frameBufferCache.size() <= 1) |
+ return 0; |
+ |
size_t frameBytesCleared = 0; |
for (size_t i = 0; i < m_frameBufferCache.size(); ++i) { |
if (i != clearExceptFrame) { |