mirror of
https://github.com/swaywm/sway.git
synced 2026-03-21 05:33:56 -04:00
common/pango: ensure we return zero on get_text_size() error
Avoid leaving out pointers undefined.
This commit is contained in:
parent
6d25b100a2
commit
2c2a2ec380
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue