From: Mikko Rasa Date: Fri, 24 May 2019 19:26:10 +0000 (+0300) Subject: Don't attempt to create a copy of null ProgramData X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3d915c3efc740c0f880859b18582f189117b3039;p=libs%2Fgl.git Don't attempt to create a copy of null ProgramData --- 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