mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 08:48:00 +02:00
[cairo] cairo_pop_group() returns a NULL pattern
cairo_pop_group() checks for a NULL return from cairo_pattern_create_for_surface() instead of the nil cairo_pattern_t, and then returns a NULL pattern instead of the nil object.
This commit is contained in:
parent
6f09e93ad7
commit
b5d2506879
1 changed files with 3 additions and 3 deletions
|
|
@ -564,7 +564,7 @@ cairo_pop_group (cairo_t *cr)
|
|||
/* Verify that we are at the right nesting level */
|
||||
if (parent_target == NULL) {
|
||||
_cairo_set_error (cr, CAIRO_STATUS_INVALID_POP_GROUP);
|
||||
return NULL;
|
||||
return (cairo_pattern_t*) &_cairo_pattern_nil.base;
|
||||
}
|
||||
|
||||
/* We need to save group_surface before we restore; we don't need
|
||||
|
|
@ -578,8 +578,8 @@ cairo_pop_group (cairo_t *cr)
|
|||
goto done;
|
||||
|
||||
group_pattern = cairo_pattern_create_for_surface (group_surface);
|
||||
if (!group_pattern) {
|
||||
_cairo_set_error (cr, CAIRO_STATUS_NO_MEMORY);
|
||||
if (cairo_pattern_status (group_pattern)) {
|
||||
_cairo_set_error (cr, cairo_pattern_status (group_pattern));
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue