app: add some g_return_if_fail() in gimp_font_list_load_names().
Some crash happens inside this function (cf. bug 795650) on Windows. Because of very inaccurate trace on this OS, it is hard to determine the exact issue. Let's at least add some basic check on function parameters. This won't fix any core issue, but may make things a bit more robust and bugs easier to detect.
This commit is contained in:
@ -201,6 +201,9 @@ gimp_font_list_load_names (GimpFontList *list,
|
||||
FcFontSet *fontset;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_FONT_LIST (list));
|
||||
g_return_if_fail (PANGO_IS_CONTEXT (context));
|
||||
|
||||
os = FcObjectSetBuild (FC_FAMILY, FC_STYLE,
|
||||
FC_SLANT, FC_WEIGHT, FC_WIDTH,
|
||||
NULL);
|
||||
|
||||
Reference in New Issue
Block a user