summaryrefslogtreecommitdiffstats
path: root/chromium/cc/paint/render_surface_filters.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/paint/render_surface_filters.cc')
-rw-r--r--chromium/cc/paint/render_surface_filters.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chromium/cc/paint/render_surface_filters.cc b/chromium/cc/paint/render_surface_filters.cc
index 0a9cb8bca72..913cd402028 100644
--- a/chromium/cc/paint/render_surface_filters.cc
+++ b/chromium/cc/paint/render_surface_filters.cc
@@ -147,7 +147,11 @@ void GetSepiaMatrix(float amount, float matrix[20]) {
sk_sp<PaintFilter> CreateMatrixImageFilter(const float matrix[20],
sk_sp<PaintFilter> input) {
- return sk_make_sp<ColorFilterPaintFilter>(SkColorFilters::Matrix(matrix),
+ auto color_filter = SkColorFilters::Matrix(matrix);
+ if (!color_filter)
+ return nullptr;
+
+ return sk_make_sp<ColorFilterPaintFilter>(std::move(color_filter),
std::move(input));
}