diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 0f5a97f157b4726488d4d61b3a3f1e246350ea08..0a5600be0de5b8c7b39571223b8a6ba1b9c4a7ab 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -493,8 +493,8 @@ hb_buffer_t::merge_out_clusters (unsigned int start, void hb_buffer_t::guess_segment_properties (void) { - if (unlikely (!len)) return; - assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE); + assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || + (!len && content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); /* If script is set to INVALID, guess from buffer contents */ if (props.script == HB_SCRIPT_INVALID) {