[thai] Minor
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 3 Oct 2018 12:44:19 +0000 (14:44 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 3 Oct 2018 13:31:33 +0000 (15:31 +0200)
src/hb-ot-shape-complex-thai.cc

index 3411068..a002c7d 100644 (file)
@@ -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])