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>2010-11-16 05:23:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-16 05:23:20 +0300
commitf59b67564110c37d822c58e70a6634405e9ed55a (patch)
tree23d04af10e4816c3f1e7b82de04df679d20aa9f4 /source/blender/blenkernel/intern/material.c
parent1f1c0b8027c5e7a49e9ce7dfc41378836acc216a (diff)
patch [#24742] materials.pop() doesn't decrement user count
from Dan Eicher (dna)
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c1
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);