summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-08-15 22:13:41 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-08-15 22:13:41 +0200
commit313ef91f50baef335313cc710567e3370d8f87c5 (patch)
treea9561fc13790c50eaa6e9432952a44ee6e4f71c7
parenta4d65b979bd5a80f839d1eb481e4fa804e723c72 (diff)
font-options: fixwip/cleanup-error5
-rw-r--r--src/cairo-font-options.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index 4be41fc06..608f59035 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -195,12 +195,14 @@ cairo_font_options_destroy (cairo_font_options_t *options)
cairo_status_t
cairo_font_options_status (cairo_font_options_t *options)
{
+ /* Use statuses instead of creating errors. _cairo_error_create()
+ * has already been invoked before creating the object. */
if (options == NULL)
return CAIRO_ERROR_NULL_POINTER;
else if (options == (cairo_font_options_t *) &_cairo_font_options_null_pointer)
- return CAIRO_ERROR_NULL_POINTER;
+ return CAIRO_STATUS_NULL_POINTER;
else if (options == (cairo_font_options_t *) &_cairo_font_options_nil)
- return CAIRO_ERROR_NO_MEMORY;
+ return CAIRO_STATUS_NO_MEMORY;
else
return CAIRO_STATUS_SUCCESS;
}