mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 00:32:59 +00:00
[subset] In unicodes cache cleanup if set insert fails.
This commit is contained in:
parent
217d38dfc7
commit
5e241094bf
1 changed files with 5 additions and 1 deletions
|
@ -1471,7 +1471,11 @@ struct SubtableUnicodesCache {
|
|||
hb_set_t* set_for(const EncodingRecord* record)
|
||||
{
|
||||
if (!cached_unicodes.has ((intptr_t) record)) {
|
||||
cached_unicodes.set ((intptr_t) record, hb_set_create ());
|
||||
hb_set_t* new_set = hb_set_create ();
|
||||
if (!cached_unicodes.set ((intptr_t) record, new_set)) {
|
||||
hb_set_destroy (new_set);
|
||||
return hb_set_empty ();
|
||||
}
|
||||
(base+record->subtable).collect_unicodes (cached_unicodes.get ((intptr_t) record));
|
||||
}
|
||||
return cached_unicodes.get ((intptr_t) record);
|
||||
|
|
Loading…
Add table
Reference in a new issue