From 625395fc98d3486942e792082837d36b1d9cdf44 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 2 Jul 2012 15:06:49 +0100 Subject: [PATCH] Fix for Typeface::clearTypefaceCache() --- modules/juce_graphics/fonts/juce_Font.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/juce_graphics/fonts/juce_Font.cpp b/modules/juce_graphics/fonts/juce_Font.cpp index 7bb4934ea6..77da2854a6 100644 --- a/modules/juce_graphics/fonts/juce_Font.cpp +++ b/modules/juce_graphics/fonts/juce_Font.cpp @@ -64,6 +64,7 @@ public: void clear() { setSize (faces.size()); + defaultFace = nullptr; } Typeface::Ptr findTypefaceFor (const Font& font) @@ -127,10 +128,7 @@ public: private: struct CachedFace { - CachedFace() noexcept - : lastUsageCount (0) - { - } + CachedFace() noexcept : lastUsageCount (0) {} // Although it seems a bit wacky to store the name here, it's because it may be a // placeholder rather than a real one, e.g. "" vs the actual typeface name.