From 8319a91ad4c010dc6060260b36fe5cb15c55e005 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 22 Nov 2014 01:52:28 +1300 Subject: 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. --- source/blender/blenkernel/intern/gpencil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index e226e9d9797..255693f0ca2 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -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); -- cgit v1.2.3