[Bf-blender-cvs] [89bcc80c254] master: Library: Add assert to catch unsupported copy flags combination

Sergey Sharybin noreply at git.blender.org
Wed Apr 25 17:00:09 CEST 2018


Commit: 89bcc80c254590f451e6d503d3b4470999a5b98a
Author: Sergey Sharybin
Date:   Wed Apr 25 16:59:35 2018 +0200
Branches: master
https://developer.blender.org/rB89bcc80c254590f451e6d503d3b4470999a5b98a

Library: Add assert to catch unsupported copy flags combination

Thanks Bastien for review!

===================================================================

M	source/blender/blenkernel/intern/library.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 10b724f9f69..292f37b5ce9 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1326,6 +1326,7 @@ void BKE_libblock_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int fla
 	}
 
 	/* the duplicate should get a copy of the animdata */
+	BLI_assert((flag & LIB_ID_COPY_ACTIONS) == 0 || (flag & LIB_ID_CREATE_NO_MAIN) == 0);
 	id_copy_animdata(bmain, new_id, (flag & LIB_ID_COPY_ACTIONS) != 0 && (flag & LIB_ID_CREATE_NO_MAIN) == 0);
 
 	if ((flag & LIB_ID_CREATE_NO_DEG_TAG) == 0 && (flag & LIB_ID_CREATE_NO_MAIN) == 0) {



More information about the Bf-blender-cvs mailing list