[Bf-blender-cvs] [86c2c4d513f] master: IDProp API: Avoid redundant group replace lookup

Campbell Barton noreply at git.blender.org
Sat May 5 09:57:18 CEST 2018


Commit: 86c2c4d513f122da86524483f33182189aacf75a
Author: Campbell Barton
Date:   Sat May 5 09:31:17 2018 +0200
Branches: master
https://developer.blender.org/rB86c2c4d513f122da86524483f33182189aacf75a

IDProp API: Avoid redundant group replace lookup

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

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

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

diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index a224ef1e212..5fb6dd558e0 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -579,10 +579,9 @@ void IDP_ReplaceGroupInGroup(IDProperty *dest, const IDProperty *src)
 void IDP_ReplaceInGroup_ex(IDProperty *group, IDProperty *prop, IDProperty *prop_exist)
 {
 	BLI_assert(group->type == IDP_GROUP);
-
 	BLI_assert(prop_exist == IDP_GetPropertyFromGroup(group, prop->name));
 
-	if ((prop_exist = IDP_GetPropertyFromGroup(group, prop->name))) {
+	if (prop_exist != NULL) {
 		BLI_insertlinkreplace(&group->data.group, prop_exist, prop);
 		IDP_FreeProperty(prop_exist);
 		MEM_freeN(prop_exist);



More information about the Bf-blender-cvs mailing list