From: Carl Worth Date: Thu, 7 Nov 2013 13:32:32 +0000 (-0800) Subject: Silence pango warning if X or Y-axis label is unset. X-Git-Url: https://git.cworth.org/git?p=acre;a=commitdiff_plain;h=ffb47f290a9cf9cd9b36ba6ab0905b8f7be8bc6a 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. --- 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);