Index: src/pdf/SkPDFShader.cpp |
=================================================================== |
--- src/pdf/SkPDFShader.cpp (revision 10286) |
+++ src/pdf/SkPDFShader.cpp (working copy) |
@@ -444,7 +444,9 @@ |
public: |
explicit SkPDFImageShader(SkPDFShader::State* state); |
virtual ~SkPDFImageShader() { |
- RemoveShader(this); |
+ if (isValid()) { |
+ RemoveShader(this); |
+ } |
fResources.unrefAll(); |
} |