From ffb47f290a9cf9cd9b36ba6ab0905b8f7be8bc6a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 7 Nov 2013 05:32:32 -0800 Subject: [PATCH] Silence pango warning if X or Y-axis label is unset. Pango emits an annoying warning if we pass it a NULL string, (though it seems to do the right thing regardless). Quiet it down by passing it an empty string instead. --- acre.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acre.c b/acre.c index 5e341fd..5177419 100644 --- a/acre.c +++ b/acre.c @@ -347,6 +347,9 @@ _create_layout (acre_t *acre, const char *text) { PangoLayout *layout; + if (text == NULL) + text = ""; + layout = pango_cairo_create_layout (acre->cr); pango_layout_set_font_description (layout, acre->font); pango_layout_set_text (layout, text, -1); -- 2.43.0