aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index b8778282e2..6302a80dc1 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -805,6 +805,10 @@ std::unique_ptr<SkScalerContext> SkTypeface::createScalerContext(
c = skstd::make_unique<SkScalerContext_Empty>(sk_ref_sp(const_cast<SkTypeface*>(this)),
effects, desc);
}
+
+ // !allowFailure implies c != nullptr
+ SkASSERT(c || allowFailure);
+
return c;
}