Skip to content

Commit abbaf5b

Browse files
committed
[graf2d] Ensure that the freetype library is initialised.
Whenever a handle to the freetype library is created, ensure that the thread-local library is initialised.
1 parent 59bd316 commit abbaf5b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

graf2d/graf/src/TTF.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ thread_local TTFhandle::FT_Library_Wrapper TTFhandle::fFT_Library;
8383

8484
////////////////////////////////////////////////////////////////////////////////
8585

86-
TTFhandle::TTFhandle() = default;
86+
TTFhandle::TTFhandle()
87+
{
88+
// Ensure that there's a freetype library in our thread
89+
fFT_Library.Get();
90+
}
8791

8892
////////////////////////////////////////////////////////////////////////////////
8993

0 commit comments

Comments
 (0)