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:
Joshua Leung 2014-11-22 01:52:28 +13:00
parent 82aa32c3a9
commit 8319a91ad4
1 changed files with 1 additions and 1 deletions

View File

@ -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);