Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: src/ports/SkImageDecoder_CG.cpp

Issue 641813009: Add test for new FrontBufferedStream behavior. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix mac assertion Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/FrontBufferedStreamTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | tests/FrontBufferedStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698