forked from bartvdbraak/blender
patch [#24742] materials.pop() doesn't decrement user count
from Dan Eicher (dna)
This commit is contained in:
parent
1f1c0b8027
commit
f59b675641
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user