[gfx] Clear mSharedBlobData if blob creation failed.

This commit is contained in:
Moonchild 2024-05-21 13:19:48 +02:00 committed by roytam1
commit 552cd74b08

View file

@ -520,8 +520,9 @@ ShareTableAndGetBlob(nsTArray<uint8_t>&& aTable,
mSharedBlobData, DeleteFontTableBlobData);
if (mBlob == hb_blob_get_empty() ) {
// The FontTableBlobData was destroyed during hb_blob_create().
// The (empty) blob is still be held in the hashtable with a strong
// The (empty) blob will still be held in the hashtable with a strong
// reference.
mSharedBlobData = nullptr;
return hb_blob_reference(mBlob);
}