mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
fix crash when ArdourButton has its text set to empty
git-svn-id: svn://localhost/ardour2/branches/3.0@10414 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d555253fff
commit
1262e9ef58
1 changed files with 5 additions and 2 deletions
|
|
@ -82,7 +82,9 @@ ArdourButton::set_text (const std::string& str)
|
||||||
_layout = Pango::Layout::create (get_pango_context());
|
_layout = Pango::Layout::create (get_pango_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_layout) {
|
||||||
_layout->set_text (str);
|
_layout->set_text (str);
|
||||||
|
}
|
||||||
|
|
||||||
queue_resize ();
|
queue_resize ();
|
||||||
}
|
}
|
||||||
|
|
@ -559,3 +561,4 @@ ArdourButton::set_image (const RefPtr<Gdk::Pixbuf>& img)
|
||||||
_pixbuf = img;
|
_pixbuf = img;
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue