Index: src/ports/SkImageDecoder_CG.cpp |
diff --git a/src/ports/SkImageDecoder_CG.cpp b/src/ports/SkImageDecoder_CG.cpp |
index 0358aec18c8c19b6c458c5e322f0a1cce5b0a851..73a95fc688e6a317a275e18e1f8d9c689f4a1b40 100644 |
--- a/src/ports/SkImageDecoder_CG.cpp |
+++ b/src/ports/SkImageDecoder_CG.cpp |
@@ -40,7 +40,9 @@ static CGDataProviderRef SkStreamToDataProvider(SkStream* stream) { |
static CGImageSourceRef SkStreamToCGImageSource(SkStream* stream) { |
CGDataProviderRef data = SkStreamToDataProvider(stream); |
- SkASSERT(data); |
+ if (!data) { |
+ return NULL; |
+ } |
CGImageSourceRef imageSrc = CGImageSourceCreateWithDataProvider(data, 0); |
CGDataProviderRelease(data); |
return imageSrc; |