Page MenuHome
Paste P1089

Masterwork From Distant Lands
ActivePublic

Authored by Dalai Felinto (dfelinto) on Aug 29 2019, 1:23 PM.
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 1545ae4f48f..f1950ba04d5 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -74,10 +74,16 @@ Material defmaterial;
static CLG_LogRef LOG = {"bke.material"};
+static free_def_material(void)
+{
+ BKE_material_free(&defmaterial);
+}
+
/* called on startup, creator.c */
void init_def_material(void)
{
BKE_material_init(&defmaterial);
+ atexit(free_def_material);
}
/** Free (or release) any data used by this material (does not free the material itself). */

Event Timeline

Dalai Felinto (dfelinto) changed the title of this paste from untitled to Masterwork From Distant Lands.