From d59c2d12b1226afa3789b0ef142f8f6cc9356ead Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 4 Apr 2018 14:56:32 +0200 Subject: 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. --- source/blender/modifiers/intern/MOD_wave.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_wave.c') diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 0c3781acb19..8fe29c78486 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -78,14 +78,6 @@ static void initData(ModifierData *md) wmd->defgrp_name[0] = 0; } -static void freeData(ModifierData *md) -{ - WaveModifierData *wmd = (WaveModifierData *) md; - if (wmd->texture) { - id_us_min(&wmd->texture->id); - } -} - static void copyData(ModifierData *md, ModifierData *target) { #if 0 @@ -383,7 +375,7 @@ ModifierTypeInfo modifierType_Wave = { /* applyModifierEM */ NULL, /* initData */ initData, /* requiredDataMask */ requiredDataMask, - /* freeData */ freeData, + /* freeData */ NULL, /* isDisabled */ NULL, /* updateDepgraph */ updateDepgraph, /* updateDepsgraph */ updateDepsgraph, -- cgit v1.2.3