diff options
author | Robin Gareus <robin@gareus.org> | 2015-06-13 22:04:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-06-13 22:04:31 +0200 |
commit | c8e16998bf98753a4e5fc6db33d5a53e9ef55ce3 (patch) | |
tree | a00ec1fab84946544b69f483a54cbcae70ea7f43 | |
parent | cc543280d9869d4a7b800d547c53e38b13d02cea (diff) |
fix crash on OSX displaying MIDI sysex, or similar text.
-rw-r--r-- | libs/canvas/text.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc index dd57888214..399488af80 100644 --- a/libs/canvas/text.cc +++ b/libs/canvas/text.cc @@ -119,7 +119,9 @@ Text::__redraw (Glib::RefPtr<Pango::Layout> layout) const int width = 0; int height = 0; Glib::RefPtr<Pango::Layout> test_layout = foo.create_pango_layout ("H"); - test_layout->set_font_description (*_font_description); + if (_font_description) { + test_layout->set_font_description (*_font_description); + } test_layout->get_pixel_size (width, height); _width_correction = width*1.5; |