From 66636f876635ee283594c15a7dbd47d5bb639366 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 5 May 2021 00:41:22 +0300 Subject: [PATCH] Mark shaders created by materials as kept Since they're stored in resources, it's not appropriate to delete them outside of it. --- source/materials/renderpass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/materials/renderpass.cpp b/source/materials/renderpass.cpp index 74b73412..3fbec482 100644 --- a/source/materials/renderpass.cpp +++ b/source/materials/renderpass.cpp @@ -43,6 +43,7 @@ void RenderPass::maybe_create_material_shader() extra_spec["use_shadow_map"] = true; shprog = material->create_compatible_shader(extra_spec); + shprog.keep(); if(shdata) shdata = new ProgramData(*shdata, shprog.get()); -- 2.45.2