From ec28ea13bcc06637d06f3aa5ee849e8a06ccd38d Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sun, 15 Nov 2009 21:16:41 +0100 Subject: [PATCH] [AdgFontStyle] Guarded args of adg_font_style_font() Added checking for invalid arguments and completed docblock. --- adg/adg-font-style.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/adg/adg-font-style.c b/adg/adg-font-style.c index c94f2952..646b3619 100644 --- a/adg/adg-font-style.c +++ b/adg/adg-font-style.c @@ -309,6 +309,7 @@ adg_font_style_new(void) /** * adg_font_style_font: * @font_style: an #AdgFontStyle object + * @ctm: the current transformation matrix * * Gets the scaled font of @font_style. The returned font is * owned by @font_style and must not be destroyed by the caller. @@ -322,6 +323,9 @@ adg_font_style_font(AdgFontStyle *font_style, const AdgMatrix *ctm) cairo_font_options_t *options; AdgMatrix matrix; + g_return_val_if_fail(ADG_IS_FONT_STYLE(font_style), NULL); + g_return_val_if_fail(ctm != NULL, NULL); + data = font_style->data; /* Check for cached font */ -- 2.11.4.GIT