From 3d915c3efc740c0f880859b18582f189117b3039 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 24 May 2019 22:26:10 +0300 Subject: [PATCH] Don't attempt to create a copy of null ProgramData --- source/renderpass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/renderpass.cpp b/source/renderpass.cpp index 55776cca..be5bb170 100644 --- a/source/renderpass.cpp +++ b/source/renderpass.cpp @@ -55,7 +55,7 @@ RenderPass::~RenderPass() void RenderPass::set_shader_program(const Program *prog, const ProgramData *data) { shprog = prog; - shdata = new ProgramData(*data); + shdata = (data ? new ProgramData(*data) : 0); } const string &RenderPass::get_slotted_uniform_name(const string &slot) const -- 2.45.2