aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/SkUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkUtils.cpp b/src/core/SkUtils.cpp
index 6eceef52c1..d8ba2b39c1 100644
--- a/src/core/SkUtils.cpp
+++ b/src/core/SkUtils.cpp
@@ -279,7 +279,9 @@ int SkUTF16_CountUnichars(const void* text, size_t byteLength) {
return -1;
}
c = *src++;
- SkASSERT(SkUTF16_IsLowSurrogate(c));
+ if (!SkUTF16_IsLowSurrogate(c)) {
+ return -1;
+ }
}
count += 1;
}