Index: src/pdf/SkPDFImage.cpp |
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp |
index 04307be77e01fa9104664135a5fbd8c407301afe..102bd58b53486b99fc89dbd95c7ad4c2e9f62356 100644 |
--- a/src/pdf/SkPDFImage.cpp |
+++ b/src/pdf/SkPDFImage.cpp |
@@ -321,6 +321,7 @@ SkPDFImage::SkPDFImage(SkStream* imageData, |
insertName("ColorSpace", "DeviceGray"); |
} else if (config == SkBitmap::kIndex8_Config || |
config == SkBitmap::kRLE_Index8_Config) { |
+ SkAutoLockPixels alp(bitmap); |
insert("ColorSpace", |
makeIndexedColorSpace(bitmap.getColorTable()))->unref(); |
} else { |