Index: third_party/harfbuzz-ng/src/hb-graphite2.cc |
diff --git a/third_party/harfbuzz-ng/src/hb-graphite2.cc b/third_party/harfbuzz-ng/src/hb-graphite2.cc |
index 709aa94419c347a7dbe537523b64bd35edd6be12..807c3308771162d3e021fbca12b59fd506bb1ae3 100644 |
--- a/third_party/harfbuzz-ng/src/hb-graphite2.cc |
+++ b/third_party/harfbuzz-ng/src/hb-graphite2.cc |
@@ -274,8 +274,8 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, |
while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) + |
DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size) |
{ |
- buffer->ensure (buffer->allocated * 2); |
- if (unlikely (buffer->in_error)) { |
+ if (unlikely (!buffer->ensure (buffer->allocated * 2))) |
+ { |
if (feats) gr_featureval_destroy (feats); |
gr_seg_destroy (seg); |
return false; |