summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-02-18 18:30:17 +0100
committerBenjamin Otte <otte@redhat.com>2011-02-18 18:30:17 +0100
commit4a3ab4b60a80b01c17ce1789019d57d5d7430fdc (patch)
treed2dba2acf2a8d4c750f460a3712bbcc6070e138e
parent3823c486f7d5b10ba3109fe547ed10eef8e87700 (diff)
region: Don't be nice to people setting internal error code
Just DIE DIE DIE in the _cairo_status_set_status() assertion.
-rw-r--r--src/cairo-region.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-region.c b/src/cairo-region.c
index b15f1516..4c57ef12 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -133,10 +133,10 @@ _cairo_region_create_in_error (cairo_status_t status)
**/
static cairo_status_t
_cairo_region_set_error (cairo_region_t *region,
- cairo_status_t status)
+ cairo_status_t status)
{
- if (! _cairo_status_is_error (status))
- return status;
+ if (status == CAIRO_STATUS_SUCCESS)
+ return CAIRO_STATUS_SUCCESS;
/* Don't overwrite an existing error. This preserves the first
* error, which is the most significant. */