diff options
-rw-r--r-- | common/pango.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/pango.c b/common/pango.c index dd27991b..5afd72d8 100644 --- a/common/pango.c +++ b/common/pango.c | |||
@@ -54,9 +54,11 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, | |||
54 | PangoLayout *layout = pango_cairo_create_layout(cairo); | 54 | PangoLayout *layout = pango_cairo_create_layout(cairo); |
55 | PangoAttrList *attrs; | 55 | PangoAttrList *attrs; |
56 | if (markup) { | 56 | if (markup) { |
57 | char *buf; | ||
57 | GError *error = NULL; | 58 | GError *error = NULL; |
58 | if (pango_parse_markup(text, -1, 0, &attrs, NULL, NULL, &error)) { | 59 | if (pango_parse_markup(text, -1, 0, &attrs, &buf, NULL, &error)) { |
59 | pango_layout_set_markup(layout, text, -1); | 60 | pango_layout_set_text(layout, buf, -1); |
61 | free(buf); | ||
60 | } else { | 62 | } else { |
61 | wlr_log(WLR_ERROR, "pango_parse_markup '%s' -> error %s", text, | 63 | wlr_log(WLR_ERROR, "pango_parse_markup '%s' -> error %s", text, |
62 | error->message); | 64 | error->message); |