diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-05 10:31:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-05 10:31:17 +0300 |
commit | 86c2c4d513f122da86524483f33182189aacf75a (patch) | |
tree | 64e9f02583d27ed26d8274b9a9e0c520be4d0da9 | |
parent | b27b4743a233bc9ba0d63aa33162324347bf371f (diff) |
IDProp API: Avoid redundant group replace lookup
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |