clients/labnag.c: return zero on get_text_size() error

Ref: https://github.com/swaywm/sway/pull/9070
This commit is contained in:
Johan Malm 2026-03-30 22:04:01 +01:00 committed by Consolatis
parent 9a8154836c
commit 46d687ab54

View file

@ -206,6 +206,16 @@ static void
get_text_size(cairo_t *cairo, const PangoFontDescription *desc, int *width, int *height,
int *baseline, double scale, bool markup, const char *fmt, ...)
{
if (width) {
*width = 0;
}
if (height) {
*height = 0;
}
if (baseline) {
*baseline = 0;
}
va_list args;
va_start(args, fmt);
gchar *buf = g_strdup_vprintf(fmt, args);