skparagraph: fix leak
Change-Id: Ieb13a5430ac78ba3d310331c72a96f0323e67d6e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258811 Auto-Submit: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
c937bc5025
commit
189f30216b
@ -96,8 +96,8 @@ std::vector<sk_sp<SkTypeface>> FontCollection::findTypefaces(const std::vector<S
|
||||
|
||||
sk_sp<SkTypeface> FontCollection::matchTypeface(const SkString& familyName, SkFontStyle fontStyle) {
|
||||
for (const auto& manager : this->getFontManagerOrder()) {
|
||||
SkFontStyleSet* set = manager->matchFamily(familyName.c_str());
|
||||
if (nullptr == set || set->count() == 0) {
|
||||
sk_sp<SkFontStyleSet> set(manager->matchFamily(familyName.c_str()));
|
||||
if (!set || set->count() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user