From a7f4c985a8080797482c971a7b6275636fe5be62 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 12 Jul 2021 17:00:46 -0600 Subject: [PATCH] [ot-layout] Always swap_buffers() even if no substitutions happened --- src/hb-ot-layout.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 340c95f7f..85795556f 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1890,16 +1890,12 @@ apply_string (OT::hb_ot_apply_context_t *c, buffer->clear_output (); buffer->idx = 0; + apply_forward (c, accel); - bool ret; - ret = apply_forward (c, accel); - if (ret) - { - if (!Proxy::inplace) - buffer->swap_buffers (); - else - assert (!buffer->has_separate_output ()); - } + if (!Proxy::inplace) + buffer->swap_buffers (); + else + assert (!buffer->has_separate_output ()); } else {