From f59b67564110c37d822c58e70a6634405e9ed55a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Nov 2010 02:23:20 +0000 Subject: [PATCH] patch [#24742] materials.pop() doesn't decrement user count from Dan Eicher (dna) --- source/blender/blenkernel/intern/material.c | 1 + 1 file changed, 1 insertion(+) 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);