diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index ba81f68ff23..8614deddc3e 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -669,6 +669,10 @@ void BKE_material_clear_id(struct ID *id, bool update_data) Material ***matar; if ((matar = give_matarar_id(id))) { short *totcol = give_totcolp_id(id); + + while ((*totcol)--) { + id_us_min((ID *)((*matar)[*totcol])); + } *totcol = 0; if (*matar) { MEM_freeN(*matar); |