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:
authorJacques Lucke <mail@jlucke.com>2019-05-16 15:11:11 +0300
committerJacques Lucke <mail@jlucke.com>2019-05-16 15:11:11 +0300
commitdb5120603f8f6236d1417199f257e35e0eb8c00b (patch)
treeb2c55dedaf2b49ac8abd4f50878bcf374e71cccb /source/blender/blenloader
parentc0d743238d022e12872549176257db8b9d602e3d (diff)
Refactor: Simplify ID Property freeing
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/blenloader/intern/versioning_280.c2
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c1
3 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 51f7ce3adcd..15749cf5d9b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2537,7 +2537,7 @@ static void _IDP_DirectLinkGroup_OrFree(IDProperty **prop,
/* corrupt file! */
printf("%s: found non group data, freeing type %d!\n", caller_func_id, (*prop)->type);
/* don't risk id, data's likely corrupt. */
- // IDP_FreeProperty(*prop);
+ // IDP_FreePropertyContent(*prop);
*prop = NULL;
}
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index d8f133c7465..9ddfce95324 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -850,7 +850,6 @@ void do_versions_after_linking_280(Main *bmain)
for (SceneRenderLayer *srl = scene->r.layers.first; srl; srl = srl->next) {
if (srl->prop) {
IDP_FreeProperty(srl->prop);
- MEM_freeN(srl->prop);
}
BKE_freestyle_config_free(&srl->freestyleConfig, true);
}
@@ -1739,7 +1738,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
/* Cleanup. */
IDP_FreeProperty(scene->layer_properties);
- MEM_freeN(scene->layer_properties);
scene->layer_properties = NULL;
#undef EEVEE_GET_FLOAT_ARRAY
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 2d6f0015634..61623a0cade 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -79,7 +79,6 @@ void BLO_update_defaults_userpref_blend(void)
if (addon->prop) {
IDP_FreeProperty(addon->prop);
- MEM_freeN(addon->prop);
addon->prop = NULL;
}
}