summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-12-26 16:56:06 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-12-26 16:56:06 +0000
commit2017fe567a14dfac7c5e0b6da6d37e95a074cb8b (patch)
treebc1fb7aba27dbd277434f992472995da98b94650 /pango
parent9ea2df686ac28e4b0c8b0a058c40076732554f29 (diff)
downloadpango-2017fe567a14dfac7c5e0b6da6d37e95a074cb8b.tar.gz
pango/pango-fontmap.c (pango_font_map_load_fontset) return_val_if_fail()
Wed Dec 26 11:52:28 2001 Owen Taylor <otaylor@redhat.com> * pango/pango-fontmap.c (pango_font_map_load_fontset) * pango/pango-context.c (pango_context_load_fontset): return_val_if_fail() if desc->family is not set.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-context.c1
-rw-r--r--pango/pango-fontmap.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 53099411..f0f3bb97 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -235,6 +235,7 @@ pango_context_load_fontset (PangoContext *context,
PangoLanguage *language)
{
g_return_val_if_fail (context != NULL, NULL);
+ g_return_val_if_fail (pango_font_description_get_family (desc) != NULL, NULL);
return pango_font_map_load_fontset (context->font_map, context, desc, language);
}
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index 4cdc4ca3..c3b62694 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -122,8 +122,9 @@ pango_font_map_load_fontset (PangoFontMap *fontmap,
const PangoFontDescription *desc,
PangoLanguage *language)
{
- g_return_val_if_fail (fontmap != NULL, 0);
-
+ g_return_val_if_fail (fontmap != NULL, NULL);
+ g_return_val_if_fail (pango_font_description_get_family (desc) != NULL, NULL);
+
return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_fontset (fontmap, context, desc, language);
}