From 87b974caa1e2b780c8031d67a42488039036c489 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 10 Jul 2016 14:52:00 +0200 Subject: Cleanup/Refactor: pass Main pointer to all ID copy functions. Also allows us to get rid of a few _copy_ex() versions... --- source/blender/editors/gpencil/gpencil_undo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/gpencil/gpencil_undo.c') diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index c39a3aa5cfc..f9b479ca03d 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -43,7 +43,9 @@ #include "BKE_blender_undo.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_gpencil.h" +#include "BKE_main.h" #include "ED_gpencil.h" @@ -151,7 +153,7 @@ void gpencil_undo_push(bGPdata *gpd) /* create new undo node */ undo_node = MEM_callocN(sizeof(bGPundonode), "gpencil undo node"); - undo_node->gpd = gpencil_data_duplicate(gpd, true); + undo_node->gpd = gpencil_data_duplicate(G.main, gpd, true); cur_node = undo_node; -- cgit v1.2.3