mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-09 07:40:43 +01:00
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.
This commit is contained in:
parent
22316a0c17
commit
c2ef45226d
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue