Fix (unreported) memleak when copying object and its material with GP settings.
Like... seriously?
This commit is contained in:
parent
534573f6b9
commit
93dc2d373f
|
@ -2266,10 +2266,6 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
|
|||
ID_NEW_REMAP_US(obn->mat[a])
|
||||
else {
|
||||
obn->mat[a] = ID_NEW_SET(obn->mat[a], BKE_material_copy(bmain, obn->mat[a]));
|
||||
/* duplicate grease pencil settings */
|
||||
if (ob->mat[a]->gp_style) {
|
||||
obn->mat[a]->gp_style = MEM_dupallocN(ob->mat[a]->gp_style);
|
||||
}
|
||||
}
|
||||
id_us_min(id);
|
||||
|
||||
|
|
Loading…
Reference in New Issue