[pango] Fix warning in g_object_ref (NULL)
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Fix warning in g_object_ref (NULL)
- Date: Mon, 7 Jan 2013 08:13:35 +0000 (UTC)
commit 87ed96661e6217727f59fe372b47ff66ccbf578b
Author: Behdad Esfahbod <behdad behdad org>
Date: Mon Jan 7 02:10:03 2013 -0600
Fix warning in g_object_ref (NULL)
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 946ef41..8f3cc53 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]