summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-01-07 02:10:03 -0600
committerBehdad Esfahbod <behdad@behdad.org>2013-01-07 02:10:03 -0600
commit87ed96661e6217727f59fe372b47ff66ccbf578b (patch)
treebe640b26daeb303c785636421776c1c09a3935ed /pango/pangocairo-fontmap.c
parent50c692acd35b2c0cfe6125f820e5480f4b59ef19 (diff)
downloadpango-87ed96661e6217727f59fe372b47ff66ccbf578b.tar.gz
Fix warning in g_object_ref (NULL)
Diffstat (limited to 'pango/pangocairo-fontmap.c')
-rw-r--r--pango/pangocairo-fontmap.c5
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);
}
/**