Index: src/core/SkRWBuffer.cpp |
diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp |
index e9147dc684f78aab570b281119e7e738d3a6287e..0784378d99a77d9c084f02d4f6b7d57476b7ae60 100644 |
--- a/src/core/SkRWBuffer.cpp |
+++ b/src/core/SkRWBuffer.cpp |
@@ -150,6 +150,9 @@ const void* SkROBuffer::Iter::data() const { |
} |
size_t SkROBuffer::Iter::size() const { |
+ if (!fBlock) { |
+ return 0; |
+ } |
return SkTMin(fBlock->fUsed, fRemaining); |
} |