1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

FreeTypeTpeface: Avoid recreating FTTypefaceList at shutdown

Calling getInstance may recreate the list singleton if it has already
been destroyed. This should only happen if a Typeface instance is being
destroyed after the app/plugin has been shutdown, e.g. if the typeface
has static storage duration.
This commit is contained in:
reuk 2024-07-08 13:16:51 +01:00
parent 1023f62338
commit 4c1a93e8d8

View file

@ -485,7 +485,7 @@ public:
~FreeTypeTypeface() override
{
if (doCache == DoCache::yes)
if (auto* list = FTTypefaceList::getInstance())
if (auto* list = FTTypefaceList::getInstanceWithoutCreating())
list->removeMemoryFace (ftFace);
}