mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-report] Handle default_font_family being NULL
There was invalid assumption in afea6fd68
. According to the following
documentation, pango_font_description_get_family can return NULL, and
g_strdup (NULL) also returns NULL.
https://docs.gtk.org/Pango/method.FontDescription.get_family.html
This commit is contained in:
parent
b8dad64b7e
commit
b9d6fc9f4f
@ -336,7 +336,9 @@ gnc_get_default_report_font_family(void)
|
||||
|
||||
pango_font_description_free (font_desc);
|
||||
|
||||
if (g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
|
||||
if (!default_font_family)
|
||||
return g_strdup ("Arial");
|
||||
else if (g_str_has_prefix (default_font_family, ".AppleSystemUIFont"))
|
||||
{
|
||||
g_free (default_font_family);
|
||||
return g_strdup ("Arial");
|
||||
|
Loading…
Reference in New Issue
Block a user