[subset] Fail subset if a table fails to sanitize.
This commit is contained in:
parent
15fc45bfed
commit
ec302ad5bd
@ -84,12 +84,15 @@ static bool
|
|||||||
_subset (hb_subset_plan_t *plan)
|
_subset (hb_subset_plan_t *plan)
|
||||||
{
|
{
|
||||||
OT::Sanitizer<TableType> sanitizer;
|
OT::Sanitizer<TableType> sanitizer;
|
||||||
|
|
||||||
hb_blob_t *source_blob = sanitizer.sanitize (plan->source->reference_table (TableType::tableTag));
|
hb_blob_t *source_blob = sanitizer.sanitize (plan->source->reference_table (TableType::tableTag));
|
||||||
const TableType *table = OT::Sanitizer<TableType>::lock_instance (source_blob);
|
const TableType *table = OT::Sanitizer<TableType>::lock_instance (source_blob);
|
||||||
hb_bool_t result = table->subset(plan);
|
|
||||||
|
hb_bool_t result = false;
|
||||||
|
if (table != &OT::Null(TableType))
|
||||||
|
result = table->subset(plan);
|
||||||
|
|
||||||
hb_blob_destroy (source_blob);
|
hb_blob_destroy (source_blob);
|
||||||
|
|
||||||
hb_tag_t tag = TableType::tableTag;
|
hb_tag_t tag = TableType::tableTag;
|
||||||
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset %s", HB_UNTAG(tag), result ? "success" : "FAILED!");
|
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c::subset %s", HB_UNTAG(tag), result ? "success" : "FAILED!");
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user