From 1b8d5e999192035c08f918aa1fcfcebdea67d82e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 3 Oct 2018 14:44:19 +0200 Subject: [PATCH] [thai] Minor --- src/hb-ot-shape-complex-thai.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-thai.cc b/src/hb-ot-shape-complex-thai.cc index 34110684c..a002c7d11 100644 --- a/src/hb-ot-shape-complex-thai.cc +++ b/src/hb-ot-shape-complex-thai.cc @@ -357,7 +357,8 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, buffer->merge_out_clusters (start - 1, end); } } - buffer->swap_buffers (); + if (likely (buffer->successful)) + buffer->swap_buffers (); /* If font has Thai GSUB, we are done. */ if (plan->props.script == HB_SCRIPT_THAI && !plan->map.found_script[0])