[util] Use g_set_error() in one more place

This commit is contained in:
Behdad Esfahbod 2021-08-12 10:43:31 -06:00
parent 4d73b3d9b1
commit 3f94177ee8
1 changed files with 7 additions and 5 deletions

View File

@ -123,11 +123,13 @@ font_options_t::post_parse (GError **error)
}
g_string_append_c (s, '\n');
char *p = g_string_free (s, FALSE);
fail (false, "Unknown font function implementation `%s'; supported values are: %s; default is %s",
font_funcs,
p,
supported_font_funcs[0].name);
//free (p);
g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
"Unknown font function implementation `%s'; supported values are: %s; default is %s",
font_funcs,
p,
supported_font_funcs[0].name);
free (p);
return;
}
}
set_font_funcs (font);