[gimp] app: add some g_return_if_fail() in gimp_font_list_load_names().
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add some g_return_if_fail() in gimp_font_list_load_names().
- Date: Tue, 1 May 2018 01:45:47 +0000 (UTC)
commit d094ab7e5618c0e751057bbbed17cc5e27326269
Author: Jehan <jehan girinstud io>
Date: Tue May 1 03:41:37 2018 +0200
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.
app/text/gimpfontlist.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/app/text/gimpfontlist.c b/app/text/gimpfontlist.c
index dc2527a..649bb75 100644
--- a/app/text/gimpfontlist.c
+++ b/app/text/gimpfontlist.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]