diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-11 19:00:06 -0700 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-11 19:00:06 -0700 |
commit | 17247f28413e4a3fb9386da60ba7b88da1507904 (patch) | |
tree | 10b4df3f4e56d3e201fd758a14a8d57c74263ab6 /pango/shape.c | |
parent | ff37f7e6799f5c852712609199411fecdf0e17e0 (diff) | |
download | pango-17247f28413e4a3fb9386da60ba7b88da1507904.tar.gz |
Be more careful about analysis->font
This might be NULL, and we want to stumble
on in that case. See #592.
Diffstat (limited to 'pango/shape.c')
-rw-r--r-- | pango/shape.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pango/shape.c b/pango/shape.c index b870ecad..401c9ec1 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -174,8 +174,9 @@ struct _PangoFcFont typedef struct _PangoFcFont PangoFcFont; #define PANGO_IS_FC_FONT(obj) \ - g_type_is_a (((GTypeInstance*)obj)->g_class->g_type, \ - g_type_from_name ("PangoFcFont")) + ((obj) != NULL && \ + g_type_is_a (((GTypeInstance*)(obj))->g_class->g_type, \ + g_type_from_name ("PangoFcFont"))) /** * pango_shape_with_flags: |