Fix (unreported) memleak when copying object and its material with GP settings.

Like... seriously?
This commit is contained in:
Bastien Montagne 2019-01-30 12:00:58 +01:00
parent 534573f6b9
commit 93dc2d373f
1 changed files with 0 additions and 4 deletions

View File

@ -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);