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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1555333002: Add null check for bmp->tex result in SkImageFilter::filterInputGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 4 years, 11 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/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index eec6d3a7e87da85e08fa0a15b4abe030222368cf..95988f844c4c7ef7c96394295b8de185478c1e28 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -544,7 +544,10 @@ bool SkImageFilter::filterInputGPU(int index, SkImageFilter::Proxy* proxy,
return false;
}
SkAutoTUnref<GrTexture> resultTex(
- GrRefCachedBitmapTexture(context, *result,GrTextureParams::ClampNoFilter()));
+ GrRefCachedBitmapTexture(context, *result, GrTextureParams::ClampNoFilter()));
+ if (!resultTex) {
+ return false;
+ }
result->setPixelRef(new SkGrPixelRef(info, resultTex))->unref();
}
return true;
« no previous file with comments | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698