summaryrefslogtreecommitdiff
path: root/shared/cairo-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/cairo-util.c')
-rw-r--r--shared/cairo-util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/shared/cairo-util.c b/shared/cairo-util.c
index d71e0ed4..15cbf82c 100644
--- a/shared/cairo-util.c
+++ b/shared/cairo-util.c
@@ -463,10 +463,12 @@ create_layout(cairo_t *cr, const char *title)
PangoFontDescription *desc;
layout = pango_cairo_create_layout(cr);
- pango_layout_set_text(layout, title, -1);
- desc = pango_font_description_from_string("Sans Bold 10");
- pango_layout_set_font_description(layout, desc);
- pango_font_description_free(desc);
+ if (title) {
+ pango_layout_set_text(layout, title, -1);
+ desc = pango_font_description_from_string("Sans Bold 10");
+ pango_layout_set_font_description(layout, desc);
+ pango_font_description_free(desc);
+ }
pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
pango_layout_set_alignment(layout, PANGO_ALIGN_LEFT);
pango_layout_set_auto_dir (layout, FALSE);