Skip to content

Commit

Permalink
gstate: Check for an invalid matrix before cairo_transform()
Browse files Browse the repository at this point in the history
Similar to the other checks that will generate an invalid matrix prior
to performing the operation.
  • Loading branch information
Chris Wilson committed Jan 22, 2010
1 parent 22316a0 commit c2ef452
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cairo-gstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c2ef452

Please sign in to comment.