summaryrefslogtreecommitdiff
path: root/src/cairo-gstate.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-01-22 14:33:53 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-01-22 23:01:52 +0000
commitc2ef45226d6801acb15854de55a5f5bc728ed65d (patch)
tree584216c9ef9b483c2247103e074c57893a0f4c0b /src/cairo-gstate.c
parent22316a0c17cd3b49ec625814f4e737b3fdc6ca63 (diff)
gstate: Check for an invalid matrix before cairo_transform()
Similar to the other checks that will generate an invalid matrix prior to performing the operation.
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r--src/cairo-gstate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 7b318070..9f0e603d 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -677,6 +677,9 @@ _cairo_gstate_transform (cairo_gstate_t *gstate,
cairo_matrix_t tmp;
cairo_status_t status;
+ if (! _cairo_matrix_is_invertible (matrix))
+ return _cairo_error (CAIRO_STATUS_INVALID_MATRIX);
+
if (_cairo_matrix_is_identity (matrix))
return CAIRO_STATUS_SUCCESS;