Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Grease Pencil data (bGPdata) is now a datablock, so it isn't safe to use MEM_dupallocN() for copying new instances of these anymore.
This commit is contained in:
parent
82aa32c3a9
commit
8319a91ad4
|
@ -286,7 +286,7 @@ bGPdata *gpencil_data_duplicate(bGPdata *src)
|
|||
return NULL;
|
||||
|
||||
/* make a copy of the base-data */
|
||||
dst = MEM_dupallocN(src);
|
||||
dst = BKE_libblock_copy(&src->id);
|
||||
|
||||
/* copy layers */
|
||||
BLI_listbase_clear(&dst->layers);
|
||||
|
|
Loading…
Reference in New Issue