diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 05:23:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 05:23:20 +0300 |
commit | f59b67564110c37d822c58e70a6634405e9ed55a (patch) | |
tree | 23d04af10e4816c3f1e7b82de04df679d20aa9f4 /source/blender/blenkernel | |
parent | 1f1c0b8027c5e7a49e9ce7dfc41378836acc216a (diff) |
patch [#24742] materials.pop() doesn't decrement user count
from Dan Eicher (dna)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 7e52f746ebc..b41d4bae1cb 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -492,6 +492,7 @@ Material *material_pop_id(ID *id, int index) short *totcol= give_totcolp_id(id); if(index >= 0 && index < (*totcol)) { ret= (*matar)[index]; + id_us_min((ID *)ret); if(*totcol <= 1) { *totcol= 0; MEM_freeN(*matar); |