From 1986f9b2adf98175abdf6cace1fbba21a96c5961 Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 8 Apr 2015 10:41:24 +0100 Subject: [PATCH] Fix TextLayout height when string is empty --- modules/juce_graphics/fonts/juce_TextLayout.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; + } }