Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-05 10:31:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-05 10:31:17 +0300
commit86c2c4d513f122da86524483f33182189aacf75a (patch)
tree64e9f02583d27ed26d8274b9a9e0c520be4d0da9 /source/blender/blenkernel/intern/idprop.c
parentb27b4743a233bc9ba0d63aa33162324347bf371f (diff)
IDProp API: Avoid redundant group replace lookup
Diffstat (limited to 'source/blender/blenkernel/intern/idprop.c')
-rw-r--r--source/blender/blenkernel/intern/idprop.c3
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);