common/pango: ensure we return zero on get_text_size() error

Avoid leaving out pointers undefined.
This commit is contained in:
Simon Ser 2026-03-14 13:08:24 +01:00 committed by Alexander Orzechowski
parent 6d25b100a2
commit 2c2a2ec380

View file

@ -84,6 +84,8 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const PangoFontDescription *desc,
void get_text_size(cairo_t *cairo, const PangoFontDescription *desc, int *width, int *height,
int *baseline, double scale, bool markup, const char *fmt, ...) {
*width = *height = *baseline = 0;
va_list args;
va_start(args, fmt);
char *buf = vformat_str(fmt, args);