mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-07 09:48:03 +02:00
Ensure that a copied pattern gets its own user_data array
This fixes the bug reported here:
Segfault with cairo_pattern_set_user_data
https://bugs.freedesktop.org/show_bug.cgi?id=11855
(cherry picked from commit 13cae8b5e6)
This commit is contained in:
parent
a76f8653d6
commit
afda117972
1 changed files with 2 additions and 0 deletions
|
|
@ -185,7 +185,9 @@ _cairo_pattern_init_copy (cairo_pattern_t *pattern,
|
|||
} break;
|
||||
}
|
||||
|
||||
/* The reference count and user_data array are unique to the copy. */
|
||||
pattern->ref_count = 1;
|
||||
_cairo_user_data_array_init (&pattern->user_data);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue