From 50ebdda3a97334e5411749cd0c309843ba8cdf44 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 19 Jul 2007 10:26:37 +0100 Subject: [PATCH] [cairo-pattern] Assert that the pattern->matrix is invertible. We guarantee when setting the pattern->matrix that it is invertible, so merely assert that it is so when we attempt to use its inverse. --- src/cairo-pattern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 2fd1c8725..43c9dc4ec 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -1979,8 +1979,8 @@ _cairo_pattern_get_extents (cairo_pattern_t *pattern, imatrix = pattern->matrix; status = cairo_matrix_invert (&imatrix); - if (status) - return status; + /* cairo_pattern_set_matrix ensures the matrix is invertible */ + assert (status == CAIRO_STATUS_SUCCESS); /* XXX Use _cairo_matrix_transform_bounding_box here */ for (sy = 0; sy <= 1; sy++) {