Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a401745

Browse files
committed
no default
1 parent 0bfebed commit a401745

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

shell/common/shell_unittests.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,14 @@ TEST_F(ShellTest, ReloadSystemFonts) {
534534
auto font =
535535
fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
536536
std::cout << "font loaded";
537-
unsigned int id = font->getId();
538-
std::cout << "the id" << id <<std::endl;
537+
if (font == nullptr) {
538+
// System does not have any font to begin with. Aborts the test.
539+
std::cout << "no default font";
540+
return;
541+
}
542+
std::cout << "has default font";
543+
// unsigned int id = font->getId();
544+
// std::cout << "the id" << id <<std::endl;
539545
// Result should be cached.
540546
// font = fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
541547
// std::cout << "comparing " << font->getId() << " with "<< id <<std::endl ;

0 commit comments

Comments
 (0)