summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-11 19:00:06 -0700
committerMatthias Clasen <mclasen@redhat.com>2021-08-11 19:00:06 -0700
commit17247f28413e4a3fb9386da60ba7b88da1507904 (patch)
tree10b4df3f4e56d3e201fd758a14a8d57c74263ab6
parentff37f7e6799f5c852712609199411fecdf0e17e0 (diff)
downloadpango-17247f28413e4a3fb9386da60ba7b88da1507904.tar.gz
Be more careful about analysis->font
This might be NULL, and we want to stumble on in that case. See #592.
-rw-r--r--pango/shape.c5
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: