diff --git a/modules/juce_graphics/fonts/juce_TextLayout.cpp b/modules/juce_graphics/fonts/juce_TextLayout.cpp index 1989bc7b7b..f5073680c4 100644 --- a/modules/juce_graphics/fonts/juce_TextLayout.cpp +++ b/modules/juce_graphics/fonts/juce_TextLayout.cpp @@ -635,4 +635,9 @@ void TextLayout::recalculateSize (const AttributedString& text) width = bounds.getWidth(); height = bounds.getHeight(); } + else + { + width = 0; + height = 0; + } }