mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 23:58:25 +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
This commit is contained in:
parent
027915717d
commit
13cae8b5e6
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