From 03b09214c073ce37eeb8af5218942c85b2d393df Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2012 22:43:58 -0400 Subject: [PATCH] [GSUB] Minor --- src/hb-ot-layout-gsub-table.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 05caee996..605ddb56b 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1315,7 +1315,10 @@ GSUB::substitute_start (hb_face_t *face, hb_buffer_t *buffer) HB_BUFFER_ALLOCATE_VAR (buffer, lig_props); HB_BUFFER_ALLOCATE_VAR (buffer, syllable); - const GDEF &gdef = *hb_ot_layout_from_face (face)->gdef; + /* TODO This pattern is duplicated from gsubgpos-private.h. Do something about it. */ + const GDEF &gdef = hb_ot_layout_from_face (face) && + !HB_SHAPER_DATA_IS_INVALID (hb_ot_layout_from_face (face)) ? + *hb_ot_layout_from_face (face)->gdef : Null(GDEF); unsigned int count = buffer->len; for (unsigned int i = 0; i < count; i++) { buffer->info[i].lig_props() = buffer->info[i].syllable() = 0;