sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 2c2a2ec38055092f368b44d4affefdfa8df17ff9
parent 6d25b100a23a17e9663cab5c286934089f2c4460
Author: Simon Ser <contact@emersion.fr>
Date:   Sat, 14 Mar 2026 13:08:24 +0100

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

Avoid leaving out pointers undefined.

Diffstat:
Mcommon/pango.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/common/pango.c b/common/pango.c @@ -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);