mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
Fix crash with empty patch-names.
An empty text will not produce a bounding box.
This commit is contained in:
parent
c5d4900ea4
commit
5ed764178a
1 changed files with 5 additions and 1 deletions
|
|
@ -72,7 +72,11 @@ Flag::set_font_description (Pango::FontDescription font_description)
|
||||||
void
|
void
|
||||||
Flag::set_text (string const & text)
|
Flag::set_text (string const & text)
|
||||||
{
|
{
|
||||||
_text->set (text);
|
if (text.empty ()) {
|
||||||
|
_text->set (" ");
|
||||||
|
} else {
|
||||||
|
_text->set (text);
|
||||||
|
}
|
||||||
boost::optional<Rect> bbox = _text->bounding_box ();
|
boost::optional<Rect> bbox = _text->bounding_box ();
|
||||||
assert (bbox);
|
assert (bbox);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue