Commit 4ed7cd1a authored by Kristian Rietveld's avatar Kristian Rietveld
Browse files

Guard for an accumulated glyph count of zero in CoreText shape engine

parent ded299c7
......@@ -225,7 +225,15 @@ run_iterator_create (struct RunIterator *iter,
iter->total_ct_i = 0;
iter->glyph_count = run_iterator_get_glyph_count (iter);
run_iterator_set_current_run (iter, 0);
/* If CoreText did not render any glyphs for this string (can happen,
* e.g. a run solely consisting of a BOM), glyph_count will be zero and
* we immediately set the iterator variable to indicate end of glyph list.
if (iter->glyph_count > 0)
run_iterator_set_current_run (iter, 0);
iter->total_ct_i = -1;
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment