From bfce4a60465e47f8c5f2cb916972e07242bbadc5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 29 Dec 2022 10:43:37 -0700 Subject: [PATCH] [cairo] Remove error path Assume cairo API always returns non-NULL. --- src/hb-cairo.cc | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index 71bd05153..d3cbd28c9 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -842,25 +842,6 @@ hb_cairo_glyphs_from_buffer (hb_buffer_t *buffer, *clusters = cairo_text_cluster_allocate (*num_clusters); } - if ((*num_glyphs && !*glyphs) || - (clusters && *num_clusters && !*clusters)) - { - if (*glyphs) - { - cairo_glyph_free (*glyphs); - *glyphs = nullptr; - *num_glyphs = 0; - } - if (clusters && *clusters) - { - cairo_text_cluster_free (*clusters); - *clusters = nullptr; - *num_clusters = 0; - *cluster_flags = (cairo_text_cluster_flags_t) 0; - } - return; - } - double x_scale = x_scale_factor ? 1. / x_scale_factor : 0.; double y_scale = y_scale_factor ? 1. / y_scale_factor : 0.; hb_position_t hx = 0, hy = 0;