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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-04-04 15:56:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-04-04 15:58:52 +0300
commitd59c2d12b1226afa3789b0ef142f8f6cc9356ead (patch)
treedfd6f50ab327b3b77994a661a449fa5ec09bbbb3 /source/blender/modifiers/intern/MOD_weightvgproximity.c
parent0c7ec5896638480c8ed0a67d80026b83e4d12526 (diff)
Fix modifier freeing code re. ID refcounting.
Free code should not handle ID refcounting at all. This has to be done at higher level, since in some case we want to free (temp) data that actually did not refcount at all its IDs. This change seems to be working OK, but as usual in that area, only lots of testing in real-case situation will say whether there are some hidden bugs or not.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgproximity.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index cbc62cdace5..09991887f69 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -286,14 +286,6 @@ static void initData(ModifierData *md)
wmd->max_dist = 1.0f; /* vert arbitrary distance, but don't use 0 */
}
-static void freeData(ModifierData *md)
-{
- WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
- if (wmd->mask_texture) {
- id_us_min(&wmd->mask_texture->id);
- }
-}
-
static void copyData(ModifierData *md, ModifierData *target)
{
#if 0
@@ -616,7 +608,7 @@ ModifierTypeInfo modifierType_WeightVGProximity = {
/* applyModifierEM */ NULL,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
- /* freeData */ freeData,
+ /* freeData */ NULL,
/* isDisabled */ isDisabled,
/* updateDepgraph */ updateDepgraph,
/* updateDepsgraph */ updateDepsgraph,