Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 22755375061..9db9ed1f5e7 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -2216,22 +2216,22 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma, bool use_open
return mat;
}
-void GPU_materials_free(void)
+void GPU_materials_free(Main *bmain)
{
Object *ob;
Material *ma;
World *wo;
extern Material defmaterial;
- for (ma = G.main->mat.first; ma; ma = ma->id.next)
+ for (ma = bmain->mat.first; ma; ma = ma->id.next)
GPU_material_free(&ma->gpumaterial);
- for (wo = G.main->world.first; wo; wo = wo->id.next)
+ for (wo = bmain->world.first; wo; wo = wo->id.next)
GPU_material_free(&wo->gpumaterial);
GPU_material_free(&defmaterial.gpumaterial);
- for (ob = G.main->object.first; ob; ob = ob->id.next)
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
GPU_lamp_free(ob);
}