summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2009-01-08 07:34:49 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2009-01-08 07:34:49 +0000
commit4a5be24fea9af2b4a49bf331d6dc50efeb89735a (patch)
tree87b6b7b0e60a4523a69231bea40e9b86eef5cddd /pango/pangofc-fontmap.c
parent6fee629b38f9cfd9b9847a254fb8718c5a981f2a (diff)
downloadpango-4a5be24fea9af2b4a49bf331d6dc50efeb89735a.tar.gz
Protect against a NULL context.
2009-01-08 Behdad Esfahbod <behdad@gnome.org> * pango/pangofc-fontmap.c (pango_fc_font_map_get_patterns): Protect against a NULL context. svn path=/trunk/; revision=2797
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 7982078d..d31a826d 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1055,7 +1055,7 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap,
key.desc = pango_font_description_copy_static (desc);
pango_font_description_unset_fields (key.desc, PANGO_FONT_MASK_SIZE);
- if (PANGO_FC_FONT_MAP_GET_CLASS (fcfontmap)->context_key_get)
+ if (context && PANGO_FC_FONT_MAP_GET_CLASS (fcfontmap)->context_key_get)
key.context_key = (gpointer)PANGO_FC_FONT_MAP_GET_CLASS (fcfontmap)->context_key_get (fcfontmap, context);
else
key.context_key = NULL;