diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2013-01-07 02:10:03 -0600 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2013-01-07 02:10:03 -0600 |
commit | 87ed96661e6217727f59fe372b47ff66ccbf578b (patch) | |
tree | be640b26daeb303c785636421776c1c09a3935ed /pango/pangocairo-fontmap.c | |
parent | 50c692acd35b2c0cfe6125f820e5480f4b59ef19 (diff) | |
download | pango-87ed96661e6217727f59fe372b47ff66ccbf578b.tar.gz |
Fix warning in g_object_ref (NULL)
Diffstat (limited to 'pango/pangocairo-fontmap.c')
-rw-r--r-- | pango/pangocairo-fontmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c index 946ef41d..8f3cc532 100644 --- a/pango/pangocairo-fontmap.c +++ b/pango/pangocairo-fontmap.c @@ -185,7 +185,10 @@ pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap) { g_return_if_fail (fontmap == NULL || PANGO_IS_CAIRO_FONT_MAP (fontmap)); - g_private_replace (&default_font_map, g_object_ref (fontmap)); + if (fontmap) + g_object_ref (fontmap); + + g_private_replace (&default_font_map, fontmap); } /** |